mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-15 09:48:14 +08:00
🐛 修复公告标题显示 <br> 的问题
This commit is contained in:
@@ -26,7 +26,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<v-card-title class="anno-title" :title="item.title">{{ item.subtitle }}</v-card-title>
|
<v-card-title class="anno-title" :title="item.title">{{
|
||||||
|
parseTitle(item.title)
|
||||||
|
}}</v-card-title>
|
||||||
<div class="anno-label" :title="`标签:${item.tagLabel}`">
|
<div class="anno-label" :title="`标签:${item.tagLabel}`">
|
||||||
<img :src="item.tagIcon" alt="tag" />
|
<img :src="item.tagIcon" alt="tag" />
|
||||||
<span>{{ item.tagLabel }}</span>
|
<span>{{ item.tagLabel }}</span>
|
||||||
@@ -89,6 +91,12 @@ onMounted(async () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function parseTitle(title: string): string {
|
||||||
|
const div = document.createElement("div");
|
||||||
|
div.innerHTML = title;
|
||||||
|
return div.innerText;
|
||||||
|
}
|
||||||
|
|
||||||
async function switchNews(): Promise<void> {
|
async function switchNews(): Promise<void> {
|
||||||
await router.push("/news/2");
|
await router.push("/news/2");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user