You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
797 B
40 lines
797 B
5 years ago
|
// @ts-ignore
|
||
|
import * as echarts from '../../../../../../components/ec-canvas/echarts.js'
|
||
|
import { voiceAnalyzeEcharts } from '../../../../utils/echarts'
|
||
|
Component({
|
||
|
/**
|
||
|
* 组件的属性列表
|
||
|
*/
|
||
|
properties: {
|
||
|
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 组件的初始数据
|
||
|
*/
|
||
|
data: {
|
||
|
voiceAnalyzeEcA: {
|
||
|
lazyLoad: true
|
||
|
},
|
||
|
},
|
||
|
lifetimes: {
|
||
|
attached() {
|
||
|
// @ts-ignore
|
||
|
this.ecComponentA = this.selectComponent('#mychart-voiceAnalyze')
|
||
|
this.initA()
|
||
|
}
|
||
|
},
|
||
|
methods: {
|
||
|
initA() {
|
||
|
// @ts-ignore
|
||
|
this.ecComponentA.init((canvas: any, width: any, height: any) => {
|
||
|
const chart = echarts.init(canvas, null, {
|
||
|
width: width,
|
||
|
height: height
|
||
|
})
|
||
|
voiceAnalyzeEcharts(chart)
|
||
|
return chart
|
||
|
})
|
||
|
},
|
||
|
}
|
||
|
})
|