refactor(plugins): update search plugin
This commit is contained in:
parent
86594a3118
commit
079bd00395
22 changed files with 348 additions and 393 deletions
|
|
@ -57,15 +57,16 @@ export function fetchMixin (proto) {
|
|||
.then(text => this._renderCover(text))
|
||||
}
|
||||
|
||||
proto.$fetch = function () {
|
||||
proto.$fetch = function (cb = noop) {
|
||||
this._fetchCover()
|
||||
this._fetch(result => {
|
||||
this.$resetEvents()
|
||||
callHook(this, 'doneEach')
|
||||
cb()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export function initFetch (vm) {
|
||||
vm.$fetch()
|
||||
vm.$fetch(_ => callHook(vm, 'ready'))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue