mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
26 lines
664 B
TypeScript
26 lines
664 B
TypeScript
import ElementPlus, {
|
|
ID_INJECTION_KEY,
|
|
ZINDEX_INJECTION_KEY,
|
|
} from 'element-plus'
|
|
|
|
import VPApp, { NotFound, globals } from '../vitepress'
|
|
import { define } from '../utils/types'
|
|
import 'uno.css'
|
|
import './style.css'
|
|
import 'vitepress/dist/client/theme-default/styles/components/vp-code-group.css'
|
|
import type { Theme } from 'vitepress'
|
|
|
|
export default define<Theme>({
|
|
NotFound,
|
|
Layout: VPApp,
|
|
enhanceApp: ({ app }) => {
|
|
app.use(ElementPlus)
|
|
app.provide(ID_INJECTION_KEY, { prefix: 1024, current: 0 })
|
|
app.provide(ZINDEX_INJECTION_KEY, { current: 0 })
|
|
|
|
globals.forEach(([name, Comp]) => {
|
|
app.component(name, Comp)
|
|
})
|
|
},
|
|
})
|