mirror of
				https://github.com/antd-tiny-vue/antd-tiny-vue.git
				synced 2025-10-31 16:51:45 +08:00 
			
		
		
		
	chore: change docs
This commit is contained in:
		| @@ -1,15 +1,17 @@ | ||||
| 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' | ||||
| // @ts-expect-error this is a local module | ||||
| import Antd from 'antd-tiny-vue' | ||||
|  | ||||
| import AntdTheme from '../components/demo.vue' | ||||
| export default { | ||||
|   ...DefaultTheme, | ||||
|   enhanceApp(ctx) { | ||||
|   async enhanceApp(ctx) { | ||||
|     DefaultTheme.enhanceApp?.(ctx) | ||||
|     ctx.app.component('Demo', AntdTheme) | ||||
|     ctx.app.use(Antd) | ||||
|     // @ts-expect-error this is a local module | ||||
|     if (!import.meta.env.SSR) { | ||||
|       // @ts-expect-error this is a local module | ||||
|       const Antd = (await import('antd-tiny-vue')).default | ||||
|       ctx.app.use(Antd) | ||||
|     } | ||||
|   } | ||||
| } as Theme | ||||
|   | ||||
		Reference in New Issue
	
	Block a user