From 65cc2649156f00f3ec8e5ddd4f6692c955ad8d5f Mon Sep 17 00:00:00 2001 From: zjl Date: Wed, 18 Dec 2024 09:19:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/columns.ts | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) 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: '状态',