antd-tiny-vue/.vitepress/theme/index.ts

16 lines
444 B
TypeScript
Raw Normal View History

2023-02-26 08:20:18 +08:00
import type { Theme } from 'vitepress'
// eslint-disable-next-line import/no-named-as-default
import DefaultTheme from 'vitepress/theme'
import { AntdTheme } from 'vite-plugin-vitepress-demo/theme'
2023-03-28 08:25:18 +08:00
// @ts-expect-error this is a local module
import Antd from 'antd-tiny-vue'
2023-02-26 08:20:18 +08:00
export default {
...DefaultTheme,
enhanceApp(ctx) {
DefaultTheme.enhanceApp?.(ctx)
ctx.app.component('Demo', AntdTheme)
2023-03-10 22:18:22 +08:00
ctx.app.use(Antd)
2023-02-26 08:20:18 +08:00
}
} as Theme