cyywl_server/yudao-ui-admin-vue3/src/plugins/elementPlus/index.ts

18 lines
464 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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