From fadb50a28bca92b65de125d80377d17b424b4abd Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Tue, 8 Dec 2020 18:14:21 +0800 Subject: [PATCH] =?UTF-8?q?film=E8=B0=83=E6=95=B4areas=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Film.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/Film.vue b/src/components/Film.vue index 08aadfd..4d2f958 100644 --- a/src/components/Film.vue +++ b/src/components/Film.vue @@ -418,6 +418,7 @@ export default { }, list: { handler (list) { + this.areas = [...new Set(list.map(ele => ele.area))].filter(x => x) this.refreshFilteredList() }, deep: true @@ -429,17 +430,14 @@ export default { if (popperVisible === true) return if (!this.showToolbar) { this.sortKeyword = '' - this.selectedAreas = this.selectedLangs = [] this.selectedYears.start = 0 this.selectedYears.end = new Date().getFullYear() } let filteredData = this.list.filter(x => (this.selectedAreas.length === 0) || this.selectedAreas.includes(x.area)) - filteredData = filteredData.filter(x => (this.selectedLangs.length === 0) || this.selectedLangs.includes(x.lang)) filteredData = filteredData.filter(res => !this.setting.excludeR18Films || !this.containsR18Keywords(res.type)) filteredData = filteredData.filter(res => res.year >= this.selectedYears.start) filteredData = filteredData.filter(res => res.year <= this.selectedYears.end) this.selectedClassName = this.type.name + ' ' + filteredData.length + '/' + this.recordcount - this.areas = [...new Set(filteredData.map(ele => ele.area))].filter(x => x) switch (this.sortKeyword) { case '按上映年份': filteredData.sort(function (a, b) {