diff --git a/src/views/system/user/columns.ts b/src/views/system/user/columns.ts index 7322490..9507357 100644 --- a/src/views/system/user/columns.ts +++ b/src/views/system/user/columns.ts @@ -24,7 +24,7 @@ export const columns = [ { label: '头像', prop: 'avatar', - minWidth: 100, + minWidth: 80, render(record) { return h(ElAvatar, { size: 48, @@ -37,7 +37,7 @@ export const columns = [ { label: '性别', prop: 'gender', - minWidth: 100, + minWidth: 80, render(record) { let typeText = ''; let color = ''; @@ -71,18 +71,27 @@ export const columns = [ { label: '手机号', prop: 'mobile', - minWidth: 160, + minWidth: 120, }, { label: '用户角色', prop: 'role', - minWidth: 100, + minWidth: 250, render(record) { let roleNames = ''; if (record.row.roles.length > 0) { roleNames = record.row.roles.map((role) => role.name).join(','); } - return h('span', roleNames || '-'); + // return h('span', roleNames || '-'); + return h( + ElTag, + { + type: 'primary', + }, + { + default: () => roleNames, + }, + ); }, }, { @@ -98,7 +107,7 @@ export const columns = [ { label: '部门', prop: 'deptName', - minWidth: 160, + minWidth: 100, }, { label: '状态',