Browse Source

解决编辑时选择用户能填充值有几率失败问题

lwx_v27
liwenxuan 4 weeks ago
parent
commit
0d52ebd7e1
  1. 16
      src/components/DesignForm/public/expand/rangedUserTree.vue

16
src/components/DesignForm/public/expand/rangedUserTree.vue

@ -107,27 +107,23 @@ function parseStringToArray(str: string) {
}
function editModeInitValue(){
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];
}
}else{
setTimeout(()=>{
editModeInitValue()
},100)
}
},1500)
}
onBeforeMount(() => {
editModeInitValue()
})
onUnmounted(()=>{
console.log("onUnmounted")
})
//

Loading…
Cancel
Save