Fixed bugs.

pull/9/head
ruibaby 6 years ago
parent 289996aa95
commit c5be555e02

@ -120,11 +120,19 @@
{{ statusProperty.text }}
</span>
<a
v-if="type==='posts'"
slot="post"
slot-scope="post"
:href="options.blog_url+'/archives/'+post.url"
target="_blank"
>{{ post.title }}</a>
<a
v-else
slot="sheet"
slot-scope="sheet"
:href="options.blog_url+'/s/'+sheet.url"
target="_blank"
>{{ sheet.title }}</a>
<span
slot="createTime"
slot-scope="createTime"
@ -241,7 +249,7 @@
import commentApi from '@/api/comment'
import optionApi from '@/api/option'
import marked from 'marked'
const columns = [
const postColumns = [
{
title: '昵称',
dataIndex: 'author'
@ -258,7 +266,7 @@ const columns = [
scopedSlots: { customRender: 'status' }
},
{
title: '评论页面',
title: '评论文章',
dataIndex: 'post',
scopedSlots: { customRender: 'post' }
},
@ -274,6 +282,39 @@ const columns = [
scopedSlots: { customRender: 'action' }
}
]
const sheetColumns = [
{
title: '昵称',
dataIndex: 'author'
},
{
title: '内容',
dataIndex: 'content',
scopedSlots: { customRender: 'content' }
},
{
title: '状态',
className: 'status',
dataIndex: 'statusProperty',
scopedSlots: { customRender: 'status' }
},
{
title: '评论页面',
dataIndex: 'sheet',
scopedSlots: { customRender: 'sheet' }
},
{
title: '日期',
dataIndex: 'createTime',
scopedSlots: { customRender: 'createTime' }
},
{
title: '操作',
dataIndex: 'action',
width: '150px',
scopedSlots: { customRender: 'action' }
}
]
export default {
name: 'CommentTab',
props: {
@ -288,7 +329,7 @@ export default {
},
data() {
return {
columns,
columns: this.type === 'posts' ? postColumns : sheetColumns,
replyCommentVisible: false,
pagination: {
current: 1,

Loading…
Cancel
Save