mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
🐛 修复公告标题显示 <br> 的问题
This commit is contained in:
@@ -26,7 +26,9 @@
|
||||
</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}`">
|
||||
<img :src="item.tagIcon" alt="tag" />
|
||||
<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> {
|
||||
await router.push("/news/2");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user