UNPKG

@cataract6545/tmui

Version:

tm-vuetify是一个新势力由主题驱动的UI组件库,相比其它优势大,组件全,设计趋势紧跟未来。具有主题生成,主题实时切换,暗黑实时切换,lottie动画,图表等新颖功能,tmui TMUI

49 lines (45 loc) 1.01 kB
import { EChartsCoreOption, EChartsOption } from "echarts"; class mytmcharts { web = null; width = 0; height = 0; optionNow: EChartsOption | null = null; constructor(c: any, w = 0, h = 0) { this.web = c; this.width = w; this.height = h; } setOption(option: EChartsOption, opts: any = {}) { if (!this.web) return; this.optionNow = option; this.web.evalJs(`mychart.setOption(${JSON.stringify(option)},${JSON.stringify(opts)})`) } getWidth() { return this.width; } getHeight() { return this.height; } getDom() { return this.web; } getOption() { return this.optionNow; } resize() { if (!this.web) return; this.web.evalJs(`mychart.resize()`) } showLoading(opts: any) { if (!this.web) return; this.web.evalJs(`mychart.showLoading(${JSON.stringify(opts)})`) } hideLoading() { if (!this.web) return; this.web.evalJs(`mychart.hideLoading()`) } getDataURL() { //暂不实现。 } } export default mytmcharts