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() + }) // 递归处理树节点,将部门节点设置为禁用