移除全量 Element Plus 与全局 VChart 注册,改为按需引入样式与组件内局部图表;Mock 适配器改为按 VITE_ENABLE_MOCK 环境变量懒加载,生产默认不拦截请求;ECharts 精简为看板所需图表,各视图与 stores 同步适配。
21 lines
384 B
TypeScript
21 lines
384 B
TypeScript
/**
|
|
* 服务看板图表按需注册。
|
|
*/
|
|
import { use } from 'echarts/core'
|
|
import { CanvasRenderer } from 'echarts/renderers'
|
|
import { BarChart, PieChart } from 'echarts/charts'
|
|
import {
|
|
GridComponent,
|
|
TooltipComponent,
|
|
LegendComponent,
|
|
} from 'echarts/components'
|
|
|
|
use([
|
|
CanvasRenderer,
|
|
BarChart,
|
|
PieChart,
|
|
GridComponent,
|
|
TooltipComponent,
|
|
LegendComponent,
|
|
])
|