Commit 473ccc9f by 李伟康

fix(dailyNewspaper): 解决子节点数组初始化问题

- 添加了对e.children的空值检查
- 确保当e.children不存在时才进行初始化
- 避免覆盖已存在的子节点数据
1 parent c0805081
...@@ -387,7 +387,9 @@ export default { ...@@ -387,7 +387,9 @@ export default {
return originChildren return originChildren
}) })
e.children = children e.children = children
} else e.children = [] } else {
if(!e.children) e.children = []
}
}) })
this.templateData = templateData this.templateData = templateData
console.log(templateData) console.log(templateData)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!