diff options
| author | Cursor Agent <cursoragent@cursor.com> | 2026-02-03 06:36:46 +0000 |
|---|---|---|
| committer | Cursor Agent <cursoragent@cursor.com> | 2026-02-03 06:36:46 +0000 |
| commit | bb97af42e9b4106fce8977208fe59cc09749e1f9 (patch) | |
| tree | ca49fb87b731086b122faf47645f642ff8de5c17 | |
| parent | 5f2ab685573b2df0317af38871f50546141b4619 (diff) | |
| download | yuescript-bb97af42e9b4106fce8977208fe59cc09749e1f9.tar.gz yuescript-bb97af42e9b4106fce8977208fe59cc09749e1f9.tar.bz2 yuescript-bb97af42e9b4106fce8977208fe59cc09749e1f9.zip | |
Mount CompilerModal in VitePress layout
Co-authored-by: dragon-fly <dragon-fly@qq.com>
| -rw-r--r-- | doc/docs/.vitepress/theme/index.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/docs/.vitepress/theme/index.ts b/doc/docs/.vitepress/theme/index.ts index fd0f640..7234afe 100644 --- a/doc/docs/.vitepress/theme/index.ts +++ b/doc/docs/.vitepress/theme/index.ts | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | import DefaultTheme from 'vitepress/theme' | 1 | import DefaultTheme from 'vitepress/theme' |
| 2 | import { h } from 'vue' | ||
| 2 | import './custom.css' | 3 | import './custom.css' |
| 3 | 4 | ||
| 4 | import CompilerModal from './components/CompilerModal.vue' | 5 | import CompilerModal from './components/CompilerModal.vue' |
| @@ -7,6 +8,10 @@ import YueDisplay from './components/YueDisplay.vue' | |||
| 7 | 8 | ||
| 8 | export default { | 9 | export default { |
| 9 | extends: DefaultTheme, | 10 | extends: DefaultTheme, |
| 11 | Layout: () => | ||
| 12 | h(DefaultTheme.Layout, null, { | ||
| 13 | 'layout-bottom': () => h(CompilerModal) | ||
| 14 | }), | ||
| 10 | enhanceApp({ app }) { | 15 | enhanceApp({ app }) { |
| 11 | app.component('CompilerModal', CompilerModal) | 16 | app.component('CompilerModal', CompilerModal) |
| 12 | app.component('YueCompiler', YueCompiler) | 17 | app.component('YueCompiler', YueCompiler) |
