element-plus/docs/.vitepress/theme/index.ts
三咲智子 d28d0701d7
docs: improve code (#5040)
* docs: remove unused code

* refactor(docs): improve code
2021-12-30 19:00:11 +08:00

28 lines
633 B
TypeScript

import ElementPlus from 'element-plus'
// windicss layers
import 'virtual:windi-base.css'
import 'virtual:windi-components.css'
import VPApp, { globals, NotFound } from '../vitepress'
import { define } from '../utils/types'
// windicss utilities should be the last style import
import 'virtual:windi-utilities.css'
// windicss devtools support (dev only)
import 'virtual:windi-devtools'
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)
})
},
})