mirror of
				https://github.com/antd-tiny-vue/antd-tiny-vue.git
				synced 2025-11-04 02:21:47 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			618 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			618 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import type { Theme } from 'vitepress'
 | 
						|
// eslint-disable-next-line import/no-named-as-default
 | 
						|
import DefaultTheme from 'vitepress/theme'
 | 
						|
import AntdTheme from '../components/demo.vue'
 | 
						|
// import { AntdTheme } from 'vite-plugin-vitepress-demo/theme'
 | 
						|
export default {
 | 
						|
  ...DefaultTheme,
 | 
						|
  async enhanceApp(ctx) {
 | 
						|
    DefaultTheme.enhanceApp?.(ctx)
 | 
						|
    ctx.app.component('Demo', AntdTheme)
 | 
						|
    // @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
 |