Echarts——获取动态数据 页面没渲染出来(vue)
01 问题接口获取的数据已经成功赋值(可打印) 但没有渲染到页面02 解决使用watch深度监听改变的值watch: {chartDataFa: {handler (newVal, oldVal) {if (this.oChart) {if (newVal) {getChart.showChart....
·
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
}
}
更多推荐
已为社区贡献1条内容
所有评论(0)