fix: 修改物模型事件回显BUG

This commit is contained in:
wangshuaiswim 2023-03-22 15:49:54 +08:00
parent e1e6bea2a7
commit 93f56a6441
1 changed files with 11 additions and 8 deletions

View File

@ -108,6 +108,9 @@ watchEffect(() => {
_value.value = props.value || {
expands: {}
}
if (props.onlyObject) {
_value.value.type = 'object'
}
})
watch(_value,
@ -116,14 +119,14 @@ watch(_value,
},
{ deep: true, immediate: true })
onMounted(() => {
if (props.onlyObject) {
_value.value = {
type: 'object',
expands: {}
}
}
})
// onMounted(() => {
// if (props.onlyObject) {
// _value.value = props.value || {
// type: 'object',
// expands: {}
// }
// }
// })
const unit = reactive({
unitOptions: [] as DefaultOptionType[],