Skip to content

Commit 7a2c528

Browse files
committed
feat: add ClientOnly
1 parent 9336e99 commit 7a2c528

File tree

3 files changed

+23
-19
lines changed

3 files changed

+23
-19
lines changed

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
<div
2-
:style="{
3-
width: '100%',
4-
borderRadius: '8px',
5-
padding: '20px',
6-
backgroundColor: '#FFF',
7-
border: '1px solid lightgray',
8-
}"
9-
>
10-
<ClientOnly>
1+
<ClientOnly>
2+
<div
3+
:style="{
4+
width: '100%',
5+
borderRadius: '8px',
6+
padding: '20px',
7+
backgroundColor: '#FFF',
8+
border: '1px solid lightgray',
9+
}"
10+
>
1111
<component :is="component" />
12-
</ClientOnly>
13-
</div>
12+
</div>
13+
</ClientOnly>
1414
15-
<div :style="{ margin: '16px 0' }">
16-
<ClientOnly>
17-
<PlaygroundLink :component="component" />
18-
</ClientOnly>
19-
</div>
15+
<ClientOnly>
16+
<div :style="{ margin: '16px 0' }">
17+
<PlaygroundLink :component="component" />
18+
</div>
19+
</ClientOnly>
2020

2121
::: details {{i18n.showCode}}
2222
<div v-html="sourceCode.markdown"></div>

site/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}
44

5-
<div>前往 <PlaygroundLink component="DataDisplay" text="Playground" /> 在线尝试</div>
5+
<ClientOnly>
6+
<div>前往 <PlaygroundLink component="DataDisplay" text="Playground" /> 在线尝试</div>
7+
</ClientOnly>
68

79
## 安装 {#install}
810

site/playground.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ navbar: false
44
sidebar: false
55
---
66

7-
<Playground/>
7+
<ClientOnly>
8+
<Playground/>
9+
</ClientOnly>
810

911
<script setup lang="ts">
1012
import { defineClientComponent } from 'vitepress'

0 commit comments

Comments
 (0)