init: v3 init

This commit is contained in:
陈凯龙
2021-12-07 14:36:07 +08:00
parent 2a7f3d2c46
commit 1ae75500de
206 changed files with 90 additions and 25740 deletions

View File

@@ -1,33 +0,0 @@
import * as echarts from 'echarts/core'
import { BarChart, LineChart, PieChart, MapChart, PictorialBarChart } from 'echarts/charts'
import {
TitleComponent,
TooltipComponent,
GridComponent,
PolarComponent,
AriaComponent,
ParallelComponent,
LegendComponent
} from 'echarts/components'
import { CanvasRenderer } from 'echarts/renderers'
echarts.use([
LegendComponent,
TitleComponent,
TooltipComponent,
GridComponent,
PolarComponent,
AriaComponent,
ParallelComponent,
BarChart,
LineChart,
PieChart,
MapChart,
CanvasRenderer,
PictorialBarChart
])
export default echarts

View File

@@ -1,18 +0,0 @@
/**
* 为了保持多页element组件的样式统一提供全局配置的方法。
*/
import { ConfigElement } from './types'
const elementConfig: ConfigElement = {
/**
* 尺寸
*/
size: 'medium',
/**
* 层级
*/
zIndex: 2000
}
export default elementConfig

View File

@@ -1,23 +0,0 @@
// 按需加载element
// 目前需要手动引入loading等插件无法自动导入
// size和zIndex也需要这样设置暂时还无法在全局配置组件中去设置
// 需要看看后面官方是不是能优化这点
import type { App } from 'vue'
import ElementConfig from './element.config'
// element全局配置项
const { size, zIndex } = ElementConfig
import { ElLoading } from 'element-plus'
const plugins = [ElLoading]
export function setupElement(app: App<Element>): void {
plugins.forEach((plugin: any) => {
app.use(plugin)
})
// 全局配置
app.config.globalProperties.$ELEMENT = { size: size, zIndex: zIndex }
}

View File

@@ -1,7 +0,0 @@
/**
* element配置
*/
export interface ConfigElement {
zIndex: number
size: 'medium' | 'small' | 'mini'
}