mirror of
https://github.com/ZiuChen/ZiuChen.github.io.git
synced 2025-12-20 09:45:38 +08:00
docs: 文档更新 添加轮播图组件
- 引入vue3-carousel - types抽离d.ts 需手动导入
This commit is contained in:
@@ -1,16 +1,25 @@
|
||||
import type { EnhanceAppContext } from 'vitepress'
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import { nextTick, watchEffect } from 'vue'
|
||||
import { inBrowser, useRouter } from 'vitepress'
|
||||
import mediumZoom from 'medium-zoom'
|
||||
|
||||
import Title from '../components/Title.vue'
|
||||
import ImgSlider from '../components/ImgSlider.vue'
|
||||
|
||||
import './index.css'
|
||||
|
||||
export default {
|
||||
...DefaultTheme,
|
||||
enhanceApp(ctx) {
|
||||
enhanceApp(ctx: EnhanceAppContext) {
|
||||
// 使用默认主题的增强应用程序功能
|
||||
DefaultTheme.enhanceApp(ctx)
|
||||
|
||||
// 注册组件
|
||||
const { app } = ctx
|
||||
app.component('Title', Title)
|
||||
app.component('ImgSlider', ImgSlider)
|
||||
console.log(app)
|
||||
},
|
||||
setup() {
|
||||
const router = useRouter()
|
||||
|
||||
Reference in New Issue
Block a user