forked from project-trans/RLE-wiki
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 在主题配置中添加了搜索功能和无障碍支持 - 引入了新的组件 SearchWithAria.vue - 全局注册了 SearchWithAria 组件
- Loading branch information
Showing
2 changed files
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
// https://vitepress.dev/guide/custom-theme | ||
import PtjsTheme from '@project-trans/vitepress-theme-project-trans/theme' | ||
|
||
import { App } from 'vue'; | ||
import SearchWithAria from '../../../packages/vitepress-theme-project-trans/src/components/SearchWithAria.vue'; // 引入组件 | ||
import 'uno.css' | ||
import './style.css' | ||
|
||
export default { | ||
extends: PtjsTheme, | ||
enhanceApp({ app }: { app: App }) { | ||
// 全局注册组件 | ||
app.component('SearchWithAria', SearchWithAria); | ||
} | ||
} |
2 changes: 0 additions & 2 deletions
2
packages/vitepress-theme-project-trans/src/components/SearchWithAria.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters