diff options
| author | Zephyrrus <[email protected]> | 2020-07-10 01:17:00 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-07-10 01:17:00 +0300 |
| commit | a721681944e9eb06742e5b3f71c71aed9c1c117d (patch) | |
| tree | 93ff9fd13a0434d91fb1ae7ca0da48d6929c4d00 /src/site/plugins/flexsearch.js | |
| parent | feat: backend pagination for albums (diff) | |
| parent | refactor: finish refactoring all the components to use vuex (diff) | |
| download | host.fuwn.me-a721681944e9eb06742e5b3f71c71aed9c1c117d.tar.xz host.fuwn.me-a721681944e9eb06742e5b3f71c71aed9c1c117d.zip | |
Merge pull request #1 from Zephyrrus/feature/store_refactor
Feature/store refactor
Diffstat (limited to 'src/site/plugins/flexsearch.js')
| -rw-r--r-- | src/site/plugins/flexsearch.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/site/plugins/flexsearch.js b/src/site/plugins/flexsearch.js index 595b180..8640232 100644 --- a/src/site/plugins/flexsearch.js +++ b/src/site/plugins/flexsearch.js @@ -1,16 +1,17 @@ import Vue from 'vue'; import FlexSearch from 'flexsearch'; + const search = new FlexSearch('speed'); // https://github.com/nextapps-de/flexsearch Vue.prototype.$search = { - items: async items => { + items: async (items) => { await search.clear(); await search.add(items); }, do: async (term, field) => { const results = await search.search(term, { field }); return results; - } + }, }; |