From 6434a9ee8ff994ca1996e2baebab0481b02aa1ad Mon Sep 17 00:00:00 2001 From: zhangyu Date: Tue, 25 May 2021 16:07:40 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9chartTemp=20?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/charts/chart-list.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nezha-fronted/src/components/charts/chart-list.vue b/nezha-fronted/src/components/charts/chart-list.vue index 5f2b26992..c85a176be 100644 --- a/nezha-fronted/src/components/charts/chart-list.vue +++ b/nezha-fronted/src/components/charts/chart-list.vue @@ -315,7 +315,6 @@ export default { this.tempDom.width = span.offsetWidth }, start (event) { - // console.log('start', event, this.dataList); event.item.querySelector('.chartTitle').style.background = '#d8dce1' const projectAndAssetFeatureInfos = event.item.querySelectorAll('.feature-content') if (projectAndAssetFeatureInfos && projectAndAssetFeatureInfos.length > 0) { @@ -611,9 +610,11 @@ export default { return } if (param.from == fromRoute.chartTemp) { // 模板列表 - this.panelDataList[0].children.forEach((item1, i) => { - item1.chartIndex = i - }) + if (this.panelDataList[0] && this.panelDataList[0].children) { + this.panelDataList[0].children.forEach((item1, i) => { + item1.chartIndex = i + }) + } this.dataList = this.panelDataList this.$nextTick(() => { this.dataList.forEach((item, index) => {