|
|
@ -83,6 +83,25 @@ function hasTableProperty(obj: object): boolean { |
|
|
} |
|
|
} |
|
|
let asfDataTitlesData: any = [] |
|
|
let asfDataTitlesData: any = [] |
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
|
|
|
asfInit() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// 修复后的watch监听逻辑 |
|
|
|
|
|
watch( |
|
|
|
|
|
// 1. 使用可选链操作符?. 避免访问不存在的属性时报错 |
|
|
|
|
|
() => props.data.control?.formid, |
|
|
|
|
|
(newVal: any) => { |
|
|
|
|
|
// 2. 只有当newVal存在(非undefined/null)时,才执行初始化逻辑 |
|
|
|
|
|
if (newVal) { |
|
|
|
|
|
asfInit() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ deep: true } |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
function asfInit(){ |
|
|
if (props.data.control &&props.data.control.formid != null && props.data.control.formid != "") { |
|
|
if (props.data.control &&props.data.control.formid != null && props.data.control.formid != "") { |
|
|
getAsfDataTitles().then(({ data }) => { |
|
|
getAsfDataTitles().then(({ data }) => { |
|
|
asfDataTitlesData = data |
|
|
asfDataTitlesData = data |
|
|
@ -119,9 +138,7 @@ onMounted(() => { |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
let fillFieldsMaster = ""; |
|
|
let fillFieldsMaster = ""; |
|
|
let fillFieldsChild: any |
|
|
let fillFieldsChild: any |
|
|
function asfValueChanged() { |
|
|
function asfValueChanged() { |
|
|
@ -195,7 +212,7 @@ function getAsfDataTitles() { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
//console.log(fillFieldsMaster) |
|
|
console.log(fillFieldsMaster) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|