优化平台角色菜单分配控件宽度
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 功能描述:校验平台48类资源均具备中文展示字段,并防止列表、详情退回数据库ID或动态英文列。
|
||||
* 版本:v1.3.0
|
||||
* 版本:v1.3.1
|
||||
*/
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
@@ -27,6 +27,7 @@ const listPage = read('src/views/shared/CrudListPage.vue');
|
||||
const listFieldDisplay = read('src/views/shared/resource-list-field-display.ts');
|
||||
const treePage = read('src/views/shared/TreePage.vue');
|
||||
const identityText = read('src/components/IdentityText.vue');
|
||||
const resourceFieldForm = read('src/views/resource/ResourceFieldForm.vue');
|
||||
|
||||
const resourceNames = [...resources.matchAll(/\bdefine\('([^']+)'/g)].map(
|
||||
(match) => match[1],
|
||||
@@ -389,6 +390,17 @@ assertIncludes(
|
||||
"f('phone', { emptyText: '未填写' })",
|
||||
'平台账户联系电话为空时必须显示业务文案',
|
||||
);
|
||||
for (const menuRelationLayoutContract of [
|
||||
'.relation-control {',
|
||||
'width: 100%;',
|
||||
'.relation-control :deep(.arco-select)',
|
||||
]) {
|
||||
assertIncludes(
|
||||
resourceFieldForm,
|
||||
menuRelationLayoutContract,
|
||||
`菜单权限等多选关系控件缺少全宽布局契约:${menuRelationLayoutContract}`,
|
||||
);
|
||||
}
|
||||
for (const rootAccountContract of [
|
||||
"String(row.platform_role_code ?? '') === 'root'",
|
||||
"visibleKeys.add('platform_role_code')",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!--
|
||||
功能:渲染标准资源的新建、编辑和业务动作字段控件。
|
||||
版本:v1.4.0
|
||||
版本:v1.4.1
|
||||
-->
|
||||
<template>
|
||||
<div class="field-grid">
|
||||
@@ -325,8 +325,15 @@ function selectOptions(field: ResourceField) {
|
||||
}
|
||||
.relation-control {
|
||||
display: grid;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
gap: 6px;
|
||||
}
|
||||
/* 关系选择器必须占满表单内容区,避免菜单等长名称被压成单字列。 */
|
||||
.relation-control :deep(.arco-select) {
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
.relation-empty {
|
||||
display: grid;
|
||||
justify-items: center;
|
||||
|
||||
Reference in New Issue
Block a user