fix(gerp): 实体选择器浏览面板标题去重并加宽加高
EntityPicker/MultiEntityPicker 浏览面板标题改用 browseTitle,占位文案已以「选择」开头时不再重复前缀;面板宽度 560->680px,列表高度 220-320 -> 420-560px。
This commit is contained in:
1 parent
263375d11f
commit
85fba0ef9f
2 files changed
+26
-8
No files matched your search
@@ -96,6 +96,15 @@ const paged = computed(() => props.config.paged !== false)
|
||||
/** 占位符:props.placeholder > config.placeholder > 默认 */
|
||||
const placeholderText = computed(() => props.placeholder || props.config.placeholder || '请选择')
|
||||
|
||||
/**
|
||||
* 浏览面板标题:占位文案本身已以「选择」开头时不再重复前缀
|
||||
* (如"选择部门员工关联(按部门分组展示)",否则会变成"选择选择部门员工关联…")
|
||||
*/
|
||||
const browseTitle = computed(() => {
|
||||
const text = placeholderText.value
|
||||
return /^(请?选择)/.test(text) ? text : `选择${text}`
|
||||
})
|
||||
|
||||
/** 树分组配置(配置了才启用树形浏览面板) */
|
||||
const treeGroupConfig = computed(() => props.config.treeGroup || undefined)
|
||||
|
||||
@@ -566,8 +575,8 @@ onBeforeUnmount(() => {
|
||||
<!-- 浏览面板:列出角色可见范围内的全部实体,分页加载 -->
|
||||
<el-dialog
|
||||
v-model="browseVisible"
|
||||
:title="`选择${placeholderText}`"
|
||||
width="560px"
|
||||
:title="browseTitle"
|
||||
width="680px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
>
|
||||
@@ -848,8 +857,8 @@ html.dark {
|
||||
|
||||
/* 列表:固定高度,内部滚动 */
|
||||
.entity-picker-browse-list {
|
||||
min-height: 220px;
|
||||
max-height: 320px;
|
||||
min-height: 420px;
|
||||
max-height: 560px;
|
||||
overflow-y: auto;
|
||||
border: 1px solid var(--el-border-color-light);
|
||||
border-radius: 6px;
|
||||
|
||||
@@ -71,6 +71,15 @@ const value = computed<string[]>({
|
||||
|
||||
const placeholderText = computed(() => props.placeholder || props.config.placeholder || '请选择(可多选)')
|
||||
|
||||
/**
|
||||
* 浏览面板标题:占位文案本身已以「选择」开头时不再重复前缀
|
||||
* (否则会变成"选择选择部门员工关联…")
|
||||
*/
|
||||
const browseTitle = computed(() => {
|
||||
const text = placeholderText.value
|
||||
return /^(请?选择)/.test(text) ? text : `选择${text}`
|
||||
})
|
||||
|
||||
// ===== 主下拉选项 =====
|
||||
const options = ref<PickerOption[]>([])
|
||||
const loading = ref(false)
|
||||
@@ -379,8 +388,8 @@ onBeforeUnmount(() => {
|
||||
<!-- 浏览面板:列出可见范围内全部实体,勾选进暂存区,点"确认选择"生效 -->
|
||||
<el-dialog
|
||||
v-model="browseVisible"
|
||||
:title="`选择${placeholderText}`"
|
||||
width="560px"
|
||||
:title="browseTitle"
|
||||
width="680px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
>
|
||||
@@ -595,8 +604,8 @@ html.dark {
|
||||
}
|
||||
|
||||
.multi-entity-picker-browse-list {
|
||||
min-height: 220px;
|
||||
max-height: 320px;
|
||||
min-height: 420px;
|
||||
max-height: 560px;
|
||||
overflow-y: auto;
|
||||
border: 1px solid var(--el-border-color-light);
|
||||
border-radius: 6px;
|
||||
|
||||
Reference in new issue
Block a user