fix:修改chartTemp 预览报错的问题

This commit is contained in:
zhangyu
2021-05-25 16:07:40 +08:00
parent 807b0aecea
commit 6434a9ee8f

View File

@@ -315,7 +315,6 @@ export default {
this.tempDom.width = span.offsetWidth this.tempDom.width = span.offsetWidth
}, },
start (event) { start (event) {
// console.log('start', event, this.dataList);
event.item.querySelector('.chartTitle').style.background = '#d8dce1' event.item.querySelector('.chartTitle').style.background = '#d8dce1'
const projectAndAssetFeatureInfos = event.item.querySelectorAll('.feature-content') const projectAndAssetFeatureInfos = event.item.querySelectorAll('.feature-content')
if (projectAndAssetFeatureInfos && projectAndAssetFeatureInfos.length > 0) { if (projectAndAssetFeatureInfos && projectAndAssetFeatureInfos.length > 0) {
@@ -611,9 +610,11 @@ export default {
return return
} }
if (param.from == fromRoute.chartTemp) { // 模板列表 if (param.from == fromRoute.chartTemp) { // 模板列表
this.panelDataList[0].children.forEach((item1, i) => { if (this.panelDataList[0] && this.panelDataList[0].children) {
item1.chartIndex = i this.panelDataList[0].children.forEach((item1, i) => {
}) item1.chartIndex = i
})
}
this.dataList = this.panelDataList this.dataList = this.panelDataList
this.$nextTick(() => { this.$nextTick(() => {
this.dataList.forEach((item, index) => { this.dataList.forEach((item, index) => {