45 lines
759 B
Plaintext
45 lines
759 B
Plaintext
import { h } from 'vue';
|
|
|
|
export const columns = [
|
|
{
|
|
title: 'ID',
|
|
dataIndex: 'id',
|
|
width: 100,
|
|
fixed: 'left',
|
|
},
|
|
{
|
|
title: '文章标题',
|
|
dataIndex: 'title',
|
|
customRender({ record }) {
|
|
return h(
|
|
'a',
|
|
{
|
|
href: 'http://www.baidu.com',
|
|
target: '_blank',
|
|
},
|
|
record.title,
|
|
);
|
|
},
|
|
width: 300,
|
|
},
|
|
{
|
|
title: '文章分类',
|
|
dataIndex: 'categoryName',
|
|
},
|
|
{
|
|
title: '文章状态',
|
|
dataIndex: 'status',
|
|
customRender({ record }) {
|
|
return h('span', record.status === 1 ? '下架' : '正常');
|
|
},
|
|
},
|
|
{
|
|
title: '创建人',
|
|
dataIndex: 'createUser',
|
|
},
|
|
{
|
|
title: '创建时间',
|
|
dataIndex: 'createTime',
|
|
},
|
|
];
|