// @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 }) }, } })