From 426ed75bc31c3543dfd33b187c01bcd010d4db5e Mon Sep 17 00:00:00 2001 From: 670788339 <670788339@qq.com> Date: Wed, 12 Nov 2025 10:51:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B2=BE=E5=93=81=E8=AF=BE=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/portal/course/Index.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/views/portal/course/Index.vue b/src/views/portal/course/Index.vue index 1489c783..de9019bf 100644 --- a/src/views/portal/course/Index.vue +++ b/src/views/portal/course/Index.vue @@ -459,9 +459,9 @@ export default { // } // 添加计算是否所有热点标签都未选中(即"全部"选中状态) - isAllHotTagsSelected() { - return !this.hotTagsList.some(tag => tag.checked); - } + // isAllHotTagsSelected() { + // return !this.hotTagsList.some(tag => tag.checked); + // } }, data() { return { @@ -527,7 +527,8 @@ export default { searchRecords: [], hotList: [], totalPages: 1, - localSessionKey: this.$xpage.constants.localCourseFiltersKey + localSessionKey: this.$xpage.constants.localCourseFiltersKey, + isAllHotTagsSelected: true, }; }, // 受众需要每次刷新 @@ -773,6 +774,7 @@ export default { this.hotTagsList.forEach(tag => { tag.checked = false; }); + this.isAllHotTagsSelected = true; // 清空course.tags this.course.tags = ''; @@ -988,13 +990,15 @@ export default { }, //点击标签 handleTagClick(item, list,type) { + this.isAllHotTagsSelected = false; + item.checked = !item.checked; // 更新course.tags const checkedTags = this.hotTagsList.filter(tag => tag.checked); let tagIds = checkedTags.map(tag => tag.id).join(','); this.course.tags = tagIds; - + this.$forceUpdate(); // 强制触发stagList重新计算 this.$nextTick(() => { this.searchData(type);