mirror of
https://github.com/jekip/naive-ui-admin.git
synced 2026-02-13 17:52:28 +08:00
37 lines
571 B
TypeScript
37 lines
571 B
TypeScript
import { h } from 'vue';
|
|
import { NTag } from 'naive-ui';
|
|
|
|
export const columns = [
|
|
{
|
|
title: 'id',
|
|
key: 'id',
|
|
},
|
|
{
|
|
title: '角色名称',
|
|
key: 'name',
|
|
},
|
|
{
|
|
title: '说明',
|
|
key: 'explain',
|
|
},
|
|
{
|
|
title: '是否默认角色',
|
|
key: 'isDefault',
|
|
render(row) {
|
|
return h(
|
|
NTag,
|
|
{
|
|
type: row.isDefault ? 'success' : 'error',
|
|
},
|
|
{
|
|
default: () => (row.isDefault ? '是' : '否'),
|
|
}
|
|
);
|
|
},
|
|
},
|
|
{
|
|
title: '创建时间',
|
|
key: 'create_date',
|
|
},
|
|
];
|