Browse Source

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

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

30
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 => {

Loading…
Cancel
Save