Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d3f9603

Browse files
feat: add ClientOnly
1 parent 7a2c528 commit d3f9603

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

‎site/.vitepress/components/code-demo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
<ClientOnly>
1616
<div :style="{ margin: '16px 0' }">
17-
<PlaygroundLink :component="component" />
17+
<PlaygroundLink :component="component" />
1818
</div>
1919
</ClientOnly>
2020

‎site/.vitepress/theme/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import CodeDemo from '../components/code-demo.md'
55
import PlaygroundLink from '../components/PlaygroundLink.vue'
66
import '@wsfe/vue-tree/style.css'
77

8-
const codeDemoComponents = import.meta.glob('../code/*.vue')
9-
108
export default {
119
extends: DefaultTheme,
1210
async enhanceApp({ app }) {
1311
// 注册自定义全局组件
1412
app.component('CodeDemo', CodeDemo)
1513
app.component('PlaygroundLink', PlaygroundLink)
14+
15+
const codeDemoComponents = import.meta.glob('../code/*.vue')
1616

1717
for (const path in codeDemoComponents) {
1818
const component = await codeDemoComponents[path]()

‎site/en/guide/getting-started.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## Try It Online {#try-it-online}
44

5-
<div>Refer to <PlaygroundLink component="DataDisplay" text="Playground" /> to try it online</div>
5+
<ClientOnly>
6+
<div>Refer to <PlaygroundLink component="DataDisplay" text="Playground" /> to try it online</div>
7+
</ClientOnly>
68

79
## Install {#install}
810

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /