feat:修复定时器不存在时报错问题

main
liu.shiyi 2 years ago
parent 815de6bf9c
commit 5cf33bfc83

@ -359,6 +359,9 @@ export default {
'changeRefreshConfig' 'changeRefreshConfig'
]), ]),
init () { init () {
if (!this.pageInfo.pageConfig.refreshConfig) {
this.pageInfo.pageConfig.refreshConfig = []
}
this.form = { ...this.pageInfo.pageConfig } this.form = { ...this.pageInfo.pageConfig }
this.drawerVisible = true this.drawerVisible = true
if (this.pageInfo.chartList.length === 0) { if (this.pageInfo.chartList.length === 0) {
@ -374,7 +377,7 @@ export default {
disabled: false disabled: false
}) })
} else { } else {
this.pageInfo.pageConfig.refreshConfig = this.pageInfo.pageConfig.refreshConfig.filter(item => item.code !== chart.code) this.pageInfo.pageConfig.refreshConfig = this.pageInfo?.pageConfig?.refreshConfig?.filter(item => item.code !== chart.code) || []
} }
}) })
} }

Loading…
Cancel
Save