From 85fba0ef9f2ba67797ab2c53dbb0e5f13681d9b8 Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Thu, 1 Oct 2026 14:10:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(gerp):=20=E5=AE=9E=E4=BD=93=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=99=A8=E6=B5=8F=E8=A7=88=E9=9D=A2=E6=9D=BF=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E5=8E=BB=E9=87=8D=E5=B9=B6=E5=8A=A0=E5=AE=BD=E5=8A=A0?= =?UTF-8?q?=E9=AB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit EntityPicker/MultiEntityPicker 浏览面板标题改用 browseTitle,占位文案已以「选择」开头时不再重复前缀;面板宽度 560->680px,列表高度 220-320 -> 420-560px。 --- src/components/EntityPicker.vue | 17 +++++++++++++---- src/components/MultiEntityPicker.vue | 17 +++++++++++++---- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/components/EntityPicker.vue b/src/components/EntityPicker.vue index 736829d..36523a5 100644 --- a/src/components/EntityPicker.vue +++ b/src/components/EntityPicker.vue @@ -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(() => { @@ -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; diff --git a/src/components/MultiEntityPicker.vue b/src/components/MultiEntityPicker.vue index fbe37c4..7f284c6 100644 --- a/src/components/MultiEntityPicker.vue +++ b/src/components/MultiEntityPicker.vue @@ -71,6 +71,15 @@ const value = computed({ const placeholderText = computed(() => props.placeholder || props.config.placeholder || '请选择(可多选)') +/** + * 浏览面板标题:占位文案本身已以「选择」开头时不再重复前缀 + * (否则会变成"选择选择部门员工关联…") + */ +const browseTitle = computed(() => { + const text = placeholderText.value + return /^(请?选择)/.test(text) ? text : `选择${text}` +}) + // ===== 主下拉选项 ===== const options = ref([]) const loading = ref(false) @@ -379,8 +388,8 @@ onBeforeUnmount(() => { @@ -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;