Ver Fonte

[doc]更新快速入门文档,添加在Svelte文件中引入和使用组件的示例,以提高用户的使用体验。

dufu1991 há 1 ano atrás
pai
commit
2a8f772a3b
2 ficheiros alterados com 22 adições e 2 exclusões
  1. 11 1
      docs/mds/guide/quickStart.md
  2. 11 1
      docs/mds/guide/quickStart_en.md

+ 11 - 1
docs/mds/guide/quickStart.md

@@ -153,7 +153,17 @@ yarn add tailwindcss @tailwindcss/vite -D
 @source "../node_modules/stdf/**/*.svelte";
 ```
 
-2.4 启动项目。
+2.4 在 Svelte 文件中引入并使用。
+
+```svelte
+<script lang="ts">
+	import { Button } from 'stdf';
+</script>
+
+<Button>点击我</Button>
+```
+
+2.5 启动项目。
 
 <!-- :::code-groups -->
 <!-- pnpm -->

+ 11 - 1
docs/mds/guide/quickStart_en.md

@@ -153,7 +153,17 @@ The following are the default theme colors of STDF, please modify them according
 @source "../node_modules/stdf/**/*.svelte";
 ```
 
-2.4 Start the project.
+2.4 Import and use components in Svelte files.
+
+```svelte
+<script lang="ts">
+	import { Button } from 'stdf';
+</script>
+
+<Button>Click me</Button>
+```
+
+2.5 Start the project.
 
 <!-- :::code-groups -->
 <!-- pnpm -->