新增-系统设置-菜单权限-角色权限页面

This commit is contained in:
啊俊
2021-07-20 22:53:08 +08:00
parent 9542345b54
commit 54e68db0c2
7 changed files with 527 additions and 2 deletions

View File

@@ -0,0 +1,66 @@
import { h } from 'vue'
import { NTag, NButton } 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'
},
{
title: '操作',
key: 'actions',
width: 150,
//简单写一下例子,不建议这么写,过段时间,这里封二次封装
render() {
return [
h(
NButton,
{
size: 'small',
type: 'error',
style: 'margin-right:10px',
onClick: () => {
}
},
{ default: () => '删除' }
),
h(
NButton,
{
size: 'small',
onClick: () => {
}
},
{ default: () => '编辑' }
)
]
}
}
]