Skip to content

Commit

Permalink
2021-6-5 页面美化,表格部分字段加上标签
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhiZDK committed Jun 5, 2021
1 parent cba19be commit d32971b
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 4 deletions.
16 changes: 15 additions & 1 deletion web/src/views/admin/admin-category.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@
<template #cover="{ text: cover }">
<img v-if="cover" :src="cover" alt="avatar"/>
</template>

<template #sort="{record }">
<span>
<a-tag
:key="tag"
:color="'geekblue'"
>
{{record.sort}}
</a-tag>
</span>
</template>


<template v-slot:action="{ text, record }">
<a-space size="small">
<a-button type="primary" @click="edit(record)">
Expand Down Expand Up @@ -107,7 +120,8 @@
},
{
title: '顺序',
dataIndex: 'sort'
dataIndex: 'sort',
slots: { customRender: 'sort' }
},
{
title: 'Action',
Expand Down
42 changes: 39 additions & 3 deletions web/src/views/admin/admin-ebook.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,39 @@
<template #cover="{ text: cover }">
<img v-if="cover" :src="cover" alt="avatar"/>
</template>

<template #docCount="{record }">
<span>
<a-tag
:key="tag"
:color="'geekblue'"
>
{{record.docCount}}
</a-tag>
</span>
</template>
<template #viewCount="{record }">
<span>
<a-tag
:key="tag"
:color="'geekblue'"
>
{{record.viewCount}}
</a-tag>
</span>
</template>
<template #voteCount="{record }">
<span>
<a-tag
:key="tag"
:color="'geekblue'"
>
{{record.voteCount}}
</a-tag>
</span>
</template>


<template v-slot:category="{ text,record }">
<span>{{ getCategoryName(record.category1Id) }} / {{ getCategoryName(record.category2Id) }}</span>
</template>
Expand Down Expand Up @@ -125,15 +158,18 @@
},
{
title: '文档数',
dataIndex: 'docCount'
dataIndex: 'docCount',
slots: { customRender: 'docCount' },
},
{
title: '阅读数',
dataIndex: 'viewCount'
dataIndex: 'viewCount',
slots: { customRender: 'viewCount' }
},
{
title: '点赞数',
dataIndex: 'voteCount'
dataIndex: 'voteCount',
slots: { customRender: 'voteCount' }
},
{
title: 'Action',
Expand Down

0 comments on commit d32971b

Please sign in to comment.