File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed
Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " vue-fuse" ,
3- "version" : " 2.0.3 " ,
3+ "version" : " 2.1.0 " ,
44 "description" : " A Vue.js pluggin for fuzzy search library, Fuse.js" ,
55 "author" : " Shayne O'Sullivan <shayneosull@gmail.com>" ,
66 "license" : " MIT" ,
Original file line number Diff line number Diff line change 1- import Vue from 'vue'
21import VueFuse from './components/VueFuse.vue'
32import Fuse from 'fuse.js'
43
5- Vue . component ( VueFuse . name , VueFuse )
6- Vue . prototype . $search = function ( term , list , options ) {
7- return new Promise ( function ( resolve , reject ) {
8- var run = new Fuse ( list , options )
9- var results = run . search ( term )
10- resolve ( results )
11- } )
4+ function install ( Vue ) {
5+ Vue . component ( VueFuse . name , VueFuse )
6+ Vue . prototype . $search = function ( term , list , options ) {
7+ return new Promise ( function ( resolve , reject ) {
8+ var run = new Fuse ( list , options )
9+ var results = run . search ( term )
10+ resolve ( results )
11+ } )
12+ }
1213}
13- export default { VueFuse }
14+
15+ // to be registered via Vue.use() as well as Vue.component()
16+ VueFuse . install = install
17+
18+ // Export component by default
19+ export default VueFuse
You can’t perform that action at this time.
0 commit comments