From 6fad39443c24a839b2fcc5efe32f4cd64b3e4154 Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Thu, 12 Dec 2024 15:53:27 +0800 Subject: [PATCH] =?UTF-8?q?refactor(web):=20=E4=BC=98=E5=8C=96=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=AF=B9=E8=AF=9D=E6=A1=86=E5=AD=97=E6=AE=B5=E5=B8=83?= =?UTF-8?q?=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 调整角色和账号状态字段的布局方式 - 增加 control 组件以改善字段显示效果 - 在 constants.js 中添加 label属性以支持新布局 --- gringotts-frontend/components/constants.js | 1 + .../components/user/dialog-user-check.js | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gringotts-frontend/components/constants.js b/gringotts-frontend/components/constants.js index 7ad9687..176d024 100644 --- a/gringotts-frontend/components/constants.js +++ b/gringotts-frontend/components/constants.js @@ -131,6 +131,7 @@ export function copyField(field, label, tips = '复制', ignoreLength = 0, extra } return { name: field, + label: label, type: 'wrapper', size: 'none', className: 'nowrap', diff --git a/gringotts-frontend/components/user/dialog-user-check.js b/gringotts-frontend/components/user/dialog-user-check.js index 57ca8f5..071c706 100644 --- a/gringotts-frontend/components/user/dialog-user-check.js +++ b/gringotts-frontend/components/user/dialog-user-check.js @@ -16,8 +16,16 @@ const dialogBody = [ { type: 'group', body: [ - mappingField('role', '角色', userRoleMapping), - mappingField('state', '账号状态', userStateMapping), + { + type: 'control', + label: '角色', + body: mappingField('role', '角色', userRoleMapping, 120), + }, + { + type: 'control', + label: '账号状态', + body: mappingField('state', '账号状态', userStateMapping), + } ] }, ...formCreatedUserAndModifiedUser(),