微调
This commit is contained in:
@@ -91,6 +91,22 @@ const columns = reactive<ColumnProps<Role.RoleBO>[]>([
|
||||
search: { el: 'input' },
|
||||
minWidth: 200,
|
||||
},
|
||||
{
|
||||
prop: 'type',
|
||||
label: '类型',
|
||||
minWidth: 200,
|
||||
render: (scope) => {
|
||||
const typeMap: { [key: number]: { label: string; type: string } } = {
|
||||
0: { label: '超级管理员', type: 'primary' },
|
||||
1: { label: '管理员角色', type: 'success' },
|
||||
2: { label: '普通角色', type: 'info' },
|
||||
};
|
||||
const typeInfo = typeMap[scope.row.type] || { label: '未知', type: 'danger' };
|
||||
return (
|
||||
<el-tag type={typeInfo.type}>{typeInfo.label}</el-tag>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '描述',
|
||||
|
||||
Reference in New Issue
Block a user