From 0d52ebd7e11ad854e1ecbfde81e2b685d7352063 Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Tue, 11 Nov 2025 14:35:16 +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 | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/src/components/DesignForm/public/expand/rangedUserTree.vue b/src/components/DesignForm/public/expand/rangedUserTree.vue index 3141208..d5c3360 100644 --- a/src/components/DesignForm/public/expand/rangedUserTree.vue +++ b/src/components/DesignForm/public/expand/rangedUserTree.vue @@ -107,29 +107,25 @@ function parseStringToArray(str: string) { } -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]; - } - }else{ - setTimeout(()=>{ - editModeInitValue() - },100) - } - - -} onBeforeMount(() => { + setTimeout(()=>{ + if(props.modelValue){ + const initialValue = parseStringToArray(props.modelValue) + value.value = initialValue; + if (initialValue.length > 0 && !multiSelect.value) { + lastSelectedValue.value = initialValue[initialValue.length - 1]; + } + } + },1500) - editModeInitValue() }) +onUnmounted(()=>{ + console.log("onUnmounted") +}) + // 递归处理树节点,将部门节点设置为禁用 const processTreeData = (data: any[]) => { return data.map(node => {