fix(仪表板): 下拉树没有相应默认值

This commit is contained in:
dataeaseShu
2025-12-17 10:43:37 +08:00
committed by dataeaseShu
parent 5ce6102810
commit d4d89c5b15

View File

@@ -124,7 +124,7 @@ watch(
}
)
const init = () => {
const init = (fromMount = false) => {
loading.value = true
const { defaultValueCheck, multiple: plus, defaultValue } = config.value
if (defaultValueCheck) {
@@ -140,6 +140,7 @@ const init = () => {
oldId = config.value.treeFieldList?.map(ele => ele.id).join('-')
multiple.value = config.value.multiple
})
if (getCascadeFieldId().length && fromMount) return
getTreeOption()
}
@@ -168,7 +169,7 @@ watch(
onMounted(() => {
setTimeout(() => {
fromSelect = true
init()
init(true)
}, 0)
})
@@ -279,6 +280,7 @@ const getCascadeFieldId = () => {
})
return filter
}
let fromSelect = false
const getOptionFromCascade = () => {
fromSelect = true