Skip to content

Commit 9336e99

Browse files
committed
feat: add ClientOnly in CodeDemo and Playground
1 parent 04713cb commit 9336e99

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@
77
border: '1px solid lightgray',
88
}"
99
>
10-
<component :is="component" />
10+
<ClientOnly>
11+
<component :is="component" />
12+
</ClientOnly>
1113
</div>
1214
13-
<p>
14-
<PlaygroundLink :component="component" />
15-
</p>
15+
<div :style="{ margin: '16px 0' }">
16+
<ClientOnly>
17+
<PlaygroundLink :component="component" />
18+
</ClientOnly>
19+
</div>
1620

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

0 commit comments

Comments
 (0)