微调
This commit is contained in:
@@ -56,10 +56,19 @@
|
||||
prop: 'type',
|
||||
label: '类型',
|
||||
width: 100,
|
||||
enum: dictStore.getDictData('resourceType'),
|
||||
search: { el: 'select', props: { filterable: true } },
|
||||
fieldNames: { label: 'label', value: 'code' },
|
||||
},
|
||||
render: (scope) => {
|
||||
const typeMap: { [key: number]: { label: string; type: string } } = {
|
||||
0: { label: '菜单', type: 'info' },
|
||||
1: { label: '按钮', type: 'warning' },
|
||||
2: { label: '公共资源', type: 'success' },
|
||||
3: { label: '服务间调用资源', type: 'primary' },
|
||||
};
|
||||
const typeInfo = typeMap[scope.row.type] || { label: '未知', type: 'danger' };
|
||||
return (
|
||||
<el-tag type={typeInfo.type}>{typeInfo.label}</el-tag>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
prop: 'icon',
|
||||
label: '图标',
|
||||
@@ -85,8 +94,6 @@
|
||||
prop: 'state',
|
||||
label: '权限资源状态',
|
||||
minWidth: 100,
|
||||
enum: dictStore.getDictData('status'),
|
||||
fieldNames: { label: 'label', value: 'code' },
|
||||
render: scope => {
|
||||
return (
|
||||
<el-tag type={scope.row.state ? 'success' : 'danger'} > {scope.row.state ? '正常' : '禁用'} </el-tag>
|
||||
|
||||
Reference in New Issue
Block a user