refactor: post list tag rendering using PostTag component (#443)

Signed-off-by: Ryan Wang <i@ryanc.cc>
pull/444/head
Ryan Wang 2022-02-21 11:40:08 +08:00 committed by GitHub
parent c6cb0a9efc
commit 2310fecc03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 13 deletions

View File

@ -210,13 +210,7 @@
>{{ category.name }}
</a-tag>
<br />
<a-tag
v-for="(tag, tagIndex) in item.tags"
:key="'tag_' + tagIndex"
:color="tag.color"
style="margin-bottom: 8px"
>{{ tag.name }}
</a-tag>
<post-tag v-for="(tag, tagIndex) in item.tags" :key="tagIndex" :tag="tag" style="margin-bottom: 8px" />
</a-list-item>
</a-list>
@ -243,7 +237,7 @@
twoToneColor="red"
type="pushpin"
/>
<a-tooltip v-if="record.inProgress" title="当前有内容已保存,但还未发布。" placement="top">
<a-tooltip v-if="record.inProgress" placement="top" title="当前有内容已保存,但还未发布。">
<a-icon
class="cursor-pointer"
style="margin-right: 3px"
@ -286,11 +280,9 @@
</a-tag>
</span>
<span slot="tags" slot-scope="tags">
<a-tag v-for="(tag, index) in tags" :key="index" :color="tag.color" style="margin-bottom: 8px">
{{ tag.name }}
</a-tag>
</span>
<template #tags="tags">
<post-tag v-for="(tag, index) in tags" :key="index" :tag="tag" style="margin-bottom: 8px" />
</template>
<span
slot="commentCount"