feat: 文章标签展示、搜索框清除按钮

- 文章详情页和文章卡片展示标签
- 搜索框右侧添加 × 清除按钮
- 标签点击跳转文章列表页自动搜索
- 修复 hasAnyFilter 未包含 tags 的 bug

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 22:43:59 +08:00
parent b95d06cc2d
commit 169e22b4cb
4 changed files with 59 additions and 2 deletions
+10
View File
@@ -86,6 +86,16 @@ function renderDesc(): string {
v-html="renderDesc()"
/>
<div v-if="post.tags?.length" class="mt-2 flex flex-wrap gap-1.5">
<span
v-for="tag in post.tags"
:key="tag"
class="tag-pill"
>
{{ tag }}
</span>
</div>
<div v-if="matchedLines && matchedLines.length > 0" class="mt-3 space-y-1.5">
<div
v-for="(line, idx) in (expanded ? matchedLines : matchedLines.slice(0, 3))"