From ee44bfe0a899a3733063d406d9c39806b9692304 Mon Sep 17 00:00:00 2001 From: haiyangcui Date: Thu, 10 Dec 2020 16:56:19 +0100 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=81=9C=E6=AD=A2=E6=90=9C?= =?UTF-8?q?=E7=B4=A2,=E8=99=BD=E7=84=B6=E5=AE=9E=E9=99=85=E4=B8=8A?= =?UTF-8?q?=E6=98=AF=E5=81=9C=E6=AD=A2=E6=8A=8A=E6=90=9C=E7=B4=A2=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E5=8A=A0=E5=85=A5searchContents,=E4=BD=86=E5=AF=B9?= =?UTF-8?q?=E4=BA=8E=E7=94=A8=E6=88=B7=E6=9D=A5=E8=AF=B4=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E6=98=AF=E8=B6=B3=E5=A4=9F=E4=BA=86.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Film.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/Film.vue b/src/components/Film.vue index ccff847..e62de06 100644 --- a/src/components/Film.vue +++ b/src/components/Film.vue @@ -45,7 +45,8 @@ - + +
@@ -345,7 +346,8 @@ export default { sortKeywords: ['按片名', '按上映年份', '按更新时间'], selectedYears: { start: 0, end: new Date().getFullYear() }, showToolbar: false, - infiniteHandlerCount: 0 + infiniteHandlerCount: 0, + keepSearching: false } }, components: { @@ -743,6 +745,9 @@ export default { this.searchList.push({ id: this.searchList.length + 1, keywords: '清除历史记录...' }) }) }, + stopSearchEvent () { + this.keepSearching = false + }, searchEvent () { const wd = this.searchTxt if (this.setting.searchGroup !== this.searchGroup) { @@ -762,6 +767,7 @@ export default { this.show.class = false this.statusText = ' ' if (wd) { + this.keepSearching = true searchSites.forEach(site => { const id = this.searchID zy.search(site.key, wd).then(res => { @@ -770,6 +776,7 @@ export default { if (type === '[object Array]') { res.forEach(element => { zy.detail(site.key, element.id).then(detailRes => { + if (!this.keepSearching) return detailRes.site = site if (id !== this.searchID) return this.searchContents.push(detailRes) @@ -782,6 +789,7 @@ export default { } if (type === '[object Object]') { zy.detail(site.key, res.id).then(detailRes => { + if (!this.keepSearching) return detailRes.site = site if (id !== this.searchID) return this.searchContents.push(detailRes)