element-plus/docs/.vitepress/theme/index.ts
2022-03-22 17:16:46 +08:00

21 lines
397 B
TypeScript

import ElementPlus from 'element-plus'
import 'uno.css'
import VPApp, { globals, NotFound } from '../vitepress'
import { define } from '../utils/types'
import type { Theme } from 'vitepress'
export default define<Theme>({
NotFound,
Layout: VPApp,
enhanceApp: ({ app }) => {
app.use(ElementPlus)
globals.forEach(([name, Comp]) => {
app.component(name, Comp)
})
},
})