feat: echarts按需引入 (#332)

This commit is contained in:
hiStephen 2024-07-10 15:38:08 +08:00 committed by GitHub
parent 122f584cad
commit 6431cc3210
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,25 @@
import * as echarts from 'echarts'
import * as echarts from 'echarts/core'
import { BarChart, PieChart, GaugeChart } from 'echarts/charts'
import {
TooltipComponent,
TitleComponent,
GridComponent,
LegendComponent
} from 'echarts/components'
import { CanvasRenderer } from 'echarts/renderers'
import { getOption } from '@/management/config/chartConfig'
echarts.use([
TitleComponent,
TooltipComponent,
GridComponent,
LegendComponent,
BarChart,
PieChart,
GaugeChart,
CanvasRenderer
])
/**
* 绘制图表
* @param {Object} el