Browse Source

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

lwx_v27
liwenxuan 2 weeks ago
parent
commit
0c72a94ed4
  1. 20
      src/components/DesignForm/public/expand/rangedUserTree.vue

20
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()
})
//

Loading…
Cancel
Save