Commit 15ec0c14 by 李伟康

fix(form): 修复子表单数据处理逻辑

- 使用深拷贝避免子表单数据引用问题
- 重置子表单children数组为空数组
- 确保origin_children保存原始数据副本
1 parent 70f6bec5
...@@ -256,7 +256,10 @@ export default { ...@@ -256,7 +256,10 @@ export default {
} else return item.baseSceneCode?.length ? hasCommonElement(item.baseSceneCode, BASE_SCENE_CODE) : true } else return item.baseSceneCode?.length ? hasCommonElement(item.baseSceneCode, BASE_SCENE_CODE) : true
}) })
templateData.map(e => { templateData.map(e => {
if (e.children && e.type == 'subform') e.origin_children = e.children[0] if (e.children && e.type == 'subform') {
e.origin_children = utils.deepClone(e.children[0])
e.children = []
}
}) })
uni.hideLoading() uni.hideLoading()
this.templateData = templateData this.templateData = templateData
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!