+
@@ -398,6 +398,7 @@
:key="tagIndex"
size="mini"
type="info" style="margin: 2px 2px; border-radius: 2px;"
+ :style="{ fontWeight: isTagMatched(tag) ? 'bold' : 'normal' }"
>
{{ tag }}
@@ -846,6 +847,14 @@ export default {
// window.removeEventListener("scroll", this.handleScroll);
},
methods: {
+
+ isTagMatched(tag) {
+ // 检查stagList中是否有匹配的标签
+ return this.stagList.some(searchTag =>
+ searchTag.tagName === tag || searchTag.name === tag
+ );
+ },
+
// 添加清除热点标签选中的方法
handleClearHotTags() {
// 清除所有热点标签的选中状态
@@ -1076,7 +1085,7 @@ handleClearTags() {
// 强制触发stagList重新计算
this.$nextTick(() => {
- this.searchData();
+ // this.searchData();
});
},
//三级分类