mirror of
https://github.com/ZiuChen/ZiuChen.github.io.git
synced 2025-12-20 09:45:38 +08:00
feat: 定期检查文档更新并弹出提醒
- 扩展基础主题代码做抽取
This commit is contained in:
14
docs/.vitepress/theme/customComponents.ts
Normal file
14
docs/.vitepress/theme/customComponents.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { App } from 'vue'
|
||||
import Title from '../components/Title.vue'
|
||||
import ImgSlider from '../components/ImgSlider.vue'
|
||||
|
||||
/**
|
||||
* 批量完成自定义组件的注册
|
||||
*/
|
||||
export function customComponents(app: App) {
|
||||
const cpns = [Title, ImgSlider]
|
||||
|
||||
for (const c of cpns) {
|
||||
app.component(c.__name, c)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user