refactor(组件): 重构链接处理并优化样式结构
- 将硬编码的详情页链接改为通过item.url统一管理 - 将评论区域的div改为可点击的a标签 - 调整图标容器的样式结构,增加定位和尺寸控制 - 修复标签过滤逻辑,避免空值导致的错误
This commit is contained in:
@@ -33,7 +33,9 @@ export const itemHead = defineComponent({
|
||||
sectionn.value = item.value.sectionn || [];
|
||||
|
||||
const sectionNameSet = new Set(sectionn.value.map((item) => item.name));
|
||||
tags.value = item.value?.tags?.filter((tagName) => !sectionNameSet.has(tagName)) || [];
|
||||
console.log(item.value.tags, "tags");
|
||||
tags.value = item.value?.tags || [];
|
||||
tags.value = tags.value?.filter((tagName) => !sectionNameSet.has(tagName)) || [];
|
||||
|
||||
// const sectionSet = new Set(sectionn.value);
|
||||
// tags.value = item.value.tags?.filter((tag) => !sectionSet.has(tag));
|
||||
@@ -107,7 +109,6 @@ export const itemHead = defineComponent({
|
||||
|
||||
const parentItemBox = targetNode.parentElement;
|
||||
if (parentItemBox?.classList.contains("item-box")) parentItemBox.style.display = "none";
|
||||
|
||||
})
|
||||
.finally(() => {
|
||||
cutShow();
|
||||
|
||||
Reference in New Issue
Block a user