element-plus/docs/.vitepress/theme/index.ts
2022-04-30 00:07:50 +08:00

20 lines
416 B
TypeScript

import ElementPlus from 'element-plus'
import VPApp, { NotFound, globals } from '../vitepress'
import { define } from '../utils/types'
import 'uno.css'
import './style.css'
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)
})
},
})