提交 d7836032 编写于 作者: laizhilong's avatar laizhilong

解决绘制树节点前端报错‘id is not defined’

上级 fe1596b0
......@@ -187,22 +187,22 @@
// 树视图默认展开一级节点
if (_this.CDdata && _this.CDdata.length > 0) {
_this.CDdata.forEach((item: any, index: any) => {
if (item[index].id) {
if (item[index]) {
_this.CDdataexpandedKeys.push(item[index].id);
}
})
}
if (_this.QXdata && _this.QXdata.length > 0) {
_this.QXdata.forEach((item: any, index: any) => {
if (item[index].id) {
_this.QXdataexpandedKeys.push(item[index]);
if (item[index]) {
_this.QXdataexpandedKeys.push(item[index].id);
}
})
}
if (_this.ZYdata && _this.ZYdata.length > 0) {
_this.ZYdata.forEach((item: any, index: any) => {
if (item[index].id) {
_this.ZYdataexpandedKeys.push(item[index]);
if (item[index]) {
_this.ZYdataexpandedKeys.push(item[index].id);
}
})
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册