mirror of https://github.com/halo-dev/halo-admin
Fixed bugs.
parent
289996aa95
commit
c5be555e02
|
@ -120,11 +120,19 @@
|
||||||
{{ statusProperty.text }}
|
{{ statusProperty.text }}
|
||||||
</span>
|
</span>
|
||||||
<a
|
<a
|
||||||
|
v-if="type==='posts'"
|
||||||
slot="post"
|
slot="post"
|
||||||
slot-scope="post"
|
slot-scope="post"
|
||||||
:href="options.blog_url+'/archives/'+post.url"
|
:href="options.blog_url+'/archives/'+post.url"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>{{ post.title }}</a>
|
>{{ post.title }}</a>
|
||||||
|
<a
|
||||||
|
v-else
|
||||||
|
slot="sheet"
|
||||||
|
slot-scope="sheet"
|
||||||
|
:href="options.blog_url+'/s/'+sheet.url"
|
||||||
|
target="_blank"
|
||||||
|
>{{ sheet.title }}</a>
|
||||||
<span
|
<span
|
||||||
slot="createTime"
|
slot="createTime"
|
||||||
slot-scope="createTime"
|
slot-scope="createTime"
|
||||||
|
@ -241,7 +249,40 @@
|
||||||
import commentApi from '@/api/comment'
|
import commentApi from '@/api/comment'
|
||||||
import optionApi from '@/api/option'
|
import optionApi from '@/api/option'
|
||||||
import marked from 'marked'
|
import marked from 'marked'
|
||||||
const columns = [
|
const postColumns = [
|
||||||
|
{
|
||||||
|
title: '昵称',
|
||||||
|
dataIndex: 'author'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '内容',
|
||||||
|
dataIndex: 'content',
|
||||||
|
scopedSlots: { customRender: 'content' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '状态',
|
||||||
|
className: 'status',
|
||||||
|
dataIndex: 'statusProperty',
|
||||||
|
scopedSlots: { customRender: 'status' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '评论文章',
|
||||||
|
dataIndex: 'post',
|
||||||
|
scopedSlots: { customRender: 'post' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '日期',
|
||||||
|
dataIndex: 'createTime',
|
||||||
|
scopedSlots: { customRender: 'createTime' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'action',
|
||||||
|
width: '150px',
|
||||||
|
scopedSlots: { customRender: 'action' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
const sheetColumns = [
|
||||||
{
|
{
|
||||||
title: '昵称',
|
title: '昵称',
|
||||||
dataIndex: 'author'
|
dataIndex: 'author'
|
||||||
|
@ -259,8 +300,8 @@ const columns = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '评论页面',
|
title: '评论页面',
|
||||||
dataIndex: 'post',
|
dataIndex: 'sheet',
|
||||||
scopedSlots: { customRender: 'post' }
|
scopedSlots: { customRender: 'sheet' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '日期',
|
title: '日期',
|
||||||
|
@ -288,7 +329,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
columns,
|
columns: this.type === 'posts' ? postColumns : sheetColumns,
|
||||||
replyCommentVisible: false,
|
replyCommentVisible: false,
|
||||||
pagination: {
|
pagination: {
|
||||||
current: 1,
|
current: 1,
|
||||||
|
|
Loading…
Reference in New Issue