Skip to content

Commit 18420e6

Browse files
committed
子表单数据联动
1 parent 1dcbae1 commit 18420e6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/ma-form/formGroup.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,8 @@ const init = () => {
576576
formDictData.value[item.dataIndex] = handlerProps(allowCoverFormType, item, response)
577577
}
578578
}
579+
} else if (allowRequestFormType.includes(item.formType) && item.dict) {
580+
formDictData.value[item.dataIndex] = []
579581
}
580582
})
581583
}
@@ -608,12 +610,12 @@ const getDictData = (name, index) => {
608610
}
609611
}
610612
611-
const handlerCascader = (val, column, index) => {
613+
const handlerCascader = async (val, column, index) => {
612614
if (column.cascaderItem && isArray(column.cascaderItem) && column.cascaderItem.length > 0 && val) {
613615
loading.value = true
614616
column.cascaderItem.map(async name => {
615617
const dict = props.columns.filter(col => col.dataIndex === name && col.dict )[0].dict
616-
if (dict && dict.url && dict.props) {
618+
if (dict && dict.url) {
617619
let response
618620
if (dict && dict.url.indexOf('{{key}}') > 0) {
619621
response = await requestDict(dict.url.replace('{{key}}', val), dict.method || 'GET', dict.params || {}, dict.data || {})

0 commit comments

Comments
 (0)