|
|
@ -14,10 +14,14 @@ export default { |
|
|
|
// msg: 'Welcome to Your Vue.js App', |
|
|
|
width: '', |
|
|
|
height: '', |
|
|
|
timer: null, |
|
|
|
}; |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.drawLine(); |
|
|
|
this.timer = setInterval(() => { |
|
|
|
this.drawLine(); |
|
|
|
}, 10000); |
|
|
|
let wh = window.innerWidth; |
|
|
|
let hg = window.innerHeight; |
|
|
|
this.width = wh + 'px'; |
|
|
@ -32,6 +36,9 @@ export default { |
|
|
|
})(); |
|
|
|
}; |
|
|
|
}, |
|
|
|
destroyed() { |
|
|
|
clearInterval(this.timer); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async drawLine() { |
|
|
|
// 基于准备好的dom,初始化echarts实例 |
|
|
|