From 0c72a94ed4f92304e5afee0d768f2099707628c6 Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Tue, 11 Nov 2025 14:15:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=BC=96=E8=BE=91=E6=97=B6?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=94=A8=E6=88=B7=E8=83=BD=E5=A1=AB=E5=85=85?= =?UTF-8?q?=E5=80=BC=E6=9C=89=E5=87=A0=E7=8E=87=E5=A4=B1=E8=B4=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../public/expand/rangedUserTree.vue | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/components/DesignForm/public/expand/rangedUserTree.vue b/src/components/DesignForm/public/expand/rangedUserTree.vue index d430126..3141208 100644 --- a/src/components/DesignForm/public/expand/rangedUserTree.vue +++ b/src/components/DesignForm/public/expand/rangedUserTree.vue @@ -106,14 +106,28 @@ function parseStringToArray(str: string) { } } -onBeforeMount(() => { - setTimeout(() => { + +function editModeInitValue(){ + + if(props.modelValue){ const initialValue = parseStringToArray(props.modelValue) value.value = initialValue; if (initialValue.length > 0 && !multiSelect.value) { lastSelectedValue.value = initialValue[initialValue.length - 1]; } - }, 500) + }else{ + setTimeout(()=>{ + editModeInitValue() + },100) + } + + +} + +onBeforeMount(() => { + + editModeInitValue() + }) // 递归处理树节点,将部门节点设置为禁用