This commit is contained in:
sjl
2024-11-15 09:38:25 +08:00
parent fddbb8c9dc
commit 43b67f2e1a
12 changed files with 35 additions and 18 deletions

View File

@@ -58,10 +58,10 @@
width: 100,
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' },
0: { label: '菜单', type: 'primary' },
1: { label: '按钮', type: 'success' },
2: { label: '公共资源', type: 'info' },
3: { label: '服务间调用资源', type: 'warning' },
};
const typeInfo = typeMap[scope.row.type] || { label: '未知', type: 'danger' };
return (
@@ -73,6 +73,7 @@
prop: 'icon',
label: '图标',
minWidth: 100,
},
{
prop: 'path',
@@ -92,8 +93,8 @@
{
prop: 'state',
label: '权限资源状态',
minWidth: 100,
label: '状态',
minWidth: 70,
render: scope => {
return (
<el-tag type={scope.row.state ? 'success' : 'danger'} > {scope.row.state ? '正常' : '禁用'} </el-tag>