You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
674 B

3 months ago
import type { App } from 'vue'
// 需要全局引入一些组件,如ElScrollbar,不然一些下拉项样式有问题
2 months ago
import { ElLoading, ElScrollbar, ElButton, ElDialog, ElForm, ElFormItem, ElInput, ElDatePicker, ElTable, ElTableColumn, ElPagination, ElCol, ElRow } from 'element-plus'
3 months ago
const plugins = [ElLoading]
2 months ago
const components = [ElScrollbar, ElButton, ElDialog, ElForm, ElFormItem, ElInput, ElDatePicker, ElTable, ElTableColumn, ElPagination, ElCol, ElRow]
3 months ago
export const setupElementPlus = (app: App<Element>) => {
plugins.forEach((plugin) => {
app.use(plugin)
})
components.forEach((component) => {
app.component(component.name, component)
})
}