<script>
mounted () {
this.initAbnormalChart()
},
methods: {
initAbnormalChart () {
// 初始化echarts
const chartDom = document.querySelector('.echart-page .chart-wrap .chart-box')
const myChart = echarts.init(chartDom)
const optionArr = this.option
optionArr && myChart.setOption(optionArr)
// 跟随窗口缩放来进行重绘
window.addEventListener('resize', () => {
setTimeout(() => {
myChart.resize()
}, 100)
})
}
}
</script>
12-28
6453
11-20
02-07
1170
03-02
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交