01 问题
接口获取的数据已经成功赋值(可打印) 但没有渲染到页面
02 解决
使用watch深度监听改变的值
watch: {
chartDataFa: {
handler (newVal, oldVal) {
if (this.oChart) {
if (newVal) {
getChart.showChart.chartLineOneSGrid5(this.oChart, this.chartDataFa[0]) //相当于setOption
} else {
this.getYjzsData()
}
} else {
this.getYjzsData()
}
},
deep: true
}
}