From d187167fbe6d68da832ce3fc21f643df4541db3d Mon Sep 17 00:00:00 2001 From: haiyangcui Date: Tue, 1 Dec 2020 16:01:47 +0100 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=8D=A2=E6=BA=90=E6=97=B6?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=B1=BB=E5=9E=8B=E4=B8=8D=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Film.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/Film.vue b/src/components/Film.vue index 911f349..d9030dc 100644 --- a/src/components/Film.vue +++ b/src/components/Film.vue @@ -424,11 +424,10 @@ export default { this.searchTxt = '' this.show.find = false this.classList = [] - this.type = {} if (FILM_DATA_CACHE[this.site.key]) { this.classList = FILM_DATA_CACHE[this.site.key].classList this.show.class = true - this.classClick(this.classList[0].name) + this.classClick(this.type.name) } else { this.getClass().then(res => { this.classList = res @@ -437,7 +436,7 @@ export default { FILM_DATA_CACHE[this.site.key] = { classList: this.classList } - this.classClick(this.classList[0].name) + this.classClick(this.type.name) }) } }, @@ -445,6 +444,10 @@ export default { this.show.classList = false this.list = [] this.type = this.classList.find(x => x.name === className) + if (!this.type) { + this.type = this.classList[0] + } + this.selectedClassName = this.type.name const cacheKey = this.site.key + '@' + this.type.tid if (FILM_DATA_CACHE[cacheKey]) { this.pagecount = FILM_DATA_CACHE[cacheKey].pagecount