Skip to content

Commit 02d7b2b

Browse files
committed
feat: add Suspense fallback
1 parent dbff840 commit 02d7b2b

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<Suspense>
22
<DemoRender :component="component" />
3+
4+
<template #fallback>
5+
Loading demo...
6+
</template>
37
</Suspense>
48

5-
<ClientOnly>
6-
<div :style="{ margin: '16px 0' }">
7-
<PlaygroundLink :component="component" />
8-
</div>
9-
</ClientOnly>
9+
<div :style="{ margin: '16px 0' }">
10+
<PlaygroundLink :component="component" />
11+
</div>
1012

1113
::: details {{i18n.showCode}}
12-
<ClientOnly>
13-
<div v-html="sourceCode.markdown"></div>
14-
</ClientOnly>
14+
<div v-html="sourceCode.markdown"></div>
1515
:::
1616

1717
<script setup lang="ts">

site/en/guide/getting-started.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

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

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

97
## Install {#install}
108

site/guide/getting-started.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
## 在线尝试 {#try-it-online}
44

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

97
## 安装 {#install}
108

0 commit comments

Comments
 (0)