Parcourir la source

[doc]Update for stdf@0.5.3

dufu1991 il y a 1 an
Parent
commit
43fee5525d

+ 2 - 2
doc/components/icon/guide.md

@@ -50,13 +50,13 @@ name 为 'slot' 表示使用插槽渲染,其他字符如 'ri-home-line' 使用
 
 ## 全局注入图标 svg 路径
 
-STDF Icon 组件使用 Svg 文件路径配置,适用于应用部署在服务器非根路径下。一般在应用的入口如 `App.svelte` 或 `+layout.svelte` 中配置 Context,例如:
+STDF Icon 组件使用 Svg 文件路径配置,适用于一次性配置全局 SVG symbol 路径,或应用部署在服务器非根路径下。一般在应用的入口如 `App.svelte` 或 `+layout.svelte` 中配置 Context,例如:
 
 ```svelte
 <!-- App.svelte/+layout.svelte -->
 <script>
 	import { setContext } from 'svelte'; // 引入 setContext
 
-	setContext('STDF_icon_svg_path', 'webapps/svelte_demo/fonts/symbol.svg'); // 设置 svg 文件路径
+	setContext('STDF-global-icon-svg-path', 'webapps/svelte_demo/fonts/symbol.svg'); // 设置 svg 文件路径
 </script>
 ```

+ 13 - 0
doc/components/icon/guide_en.md

@@ -47,3 +47,16 @@ The `injClass` parameter can be used to inject a CSS class name (not limited to
 ## Slot
 
 Any element can be inserted (even the Icon component itself), but mainly used for customizing icons or icon colors, such as inserting custom SVGs into the Icon component. Please note the relationship between the viewBox, height, and width of the SVG and the display property. The icon content depends on the element passed in. The parameters such as name, size, and theme in Props will be invalid. The slot will give the component more customizability in terms of content.
+
+## Global Injection Icon SVG Path
+
+STDF Icon component uses SVG file path configuration, which is suitable for a one-time configuration of the global SVG symbol path or the application being deployed on a non-root server path. Usually, the Context is configured in the entry of the application, such as `App.svelte` or `+layout.svelte`, for example:
+
+```svelte
+<!-- App.svelte/+layout.svelte -->
+<script>
+	import { setContext } from 'svelte'; // Import setContext
+
+	setContext('STDF-global-icon-svg-path', 'webapps/svelte_demo/fonts/symbol.svg'); // Set the SVG file path
+</script>
+```

+ 4 - 0
doc/components/icon/version.md

@@ -1,3 +1,7 @@
+## 0.5.3
+
+- [!tag|O|0|] 支持一次性配置全局 SVG symbol 路径。关联 [PR](https://github.com/any-tdf/stdf/pull/28)。[!contribute|zh1047842950|]
+
 ## 0.2.11
 
 - [!tag|B|1|] Icon 组件区域不再是 `inline-block`。

+ 4 - 0
doc/components/icon/version_en.md

@@ -1,3 +1,7 @@
+## 0.5.3
+
+- [!tag|O|0|] Support one-time configuration of the global SVG symbol path. Related to [PR](https://github.com/any-tdf/stdf/pull/28). [!contribute|zh1047842950|]
+
 ## 0.2.11
 
 - [!tag|B|1|] The Icon component area is no longer `inline-block`.

+ 4 - 0
doc/guide/changelog.md

@@ -1,3 +1,7 @@
+## 0.5.3 <font size=1>2024-11-19</font>
+
+- 优化 Icon 组件,详见 [Icon](https://stdf.design/#/components?nav=icon&tab=4)。
+
 ## 0.5.2 <font size=1>2024-10-02</font>
 
 - 优化 Button 组件,详见 [Button](https://stdf.design/#/components?nav=button&tab=4)。

+ 4 - 0
doc/guide/changelog_en.md

@@ -1,3 +1,7 @@
+## 0.5.3 <font size=1>2024-11-19</font>
+
+- Optimized Icon component, please see [Icon](https://stdf.design/#/components?nav=icon&tab=4).
+
 ## 0.5.2 <font size=1>2024-10-02</font>
 
 - Optimized Button component, please see [Button](https://stdf.design/#/components?nav=button&tab=4).