diff --git a/vmall/react-native-svg.md b/vmall/react-native-svg.md index 9babb963484dc754a1473d2e8f5166000d4cc235..53e82ef549671a220d30f375ebc748b129bc8b7a 100644 --- a/vmall/react-native-svg.md +++ b/vmall/react-native-svg.md @@ -1,4 +1,4 @@ -> 模板版本:v0.1.1 +> 模板版本:v0.1.2

react-native-svg

@@ -196,58 +196,62 @@ ohpm install 以下为目前已支持的组件属性: +> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 + +> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 + **Svg**:绘制组件的父组件 -| 名称 | 说明 | 类型 | 是否必填 | 原库平台 | 鸿蒙支持 | -| :-----: | :------: | :-------------: | -------- | -------- | -------- | -| width | 组件宽度 | number\| string | Yes | All | Yes | -| height | 组件高度 | number\| string | Yes | All | Yes | -| viewBox | 组件视区 | string | No | All | Yes | -| color | 颜色 | string | No | All | Yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :-----: | :---------: | :-------------: | -------- | -------- | ----------------- | +| width | 组件宽度 | number\| string | Yes | All | Yes | +| height | 组件高度 | number\| string | Yes | All | Yes | +| viewBox | 组件视区 | string | No | All | Yes | +| color | 颜色 | string | No | All | Yes | **G**:该元素是用于对其他 SVG 元素进行分组的容器 -| 名称 | 说明 | 类型 | 是否必填 | 原库平台 | 鸿蒙支持 | -| :--: | :--: | :--: | -------- | -------- | -------- | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :--: | :---------: | :--: | -------- | -------- | ----------------- | **Path**: 路径绘制组件,根据绘制路径生成封闭的自定义形状 -| 名称 | 说明 | 类型 | 是否必填 | 原库平台 | 鸿蒙支持 | -| :--: | :------------------: | :----: | -------- | -------- | -------- | -| d | 路径绘制的命令字符串 | string | Yes | All | Yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :--: | :------------------: | :----: | -------- | -------- | ----------------- | +| d | 路径绘制的命令字符串 | string | Yes | All | Yes | **Rect**: 矩形绘制组件,根据角位置和宽高生成矩形形状 -| 名称 | 说明 | 类型 | 是否必填 | 原库平台 | 鸿蒙支持 | -| :----: | :---------------: | :-------------: | -------- | -------- | -------- | -| x | 在 x 轴上平移距离 | number\| string | No | All | Yes | -| y | 在 y 轴上平移距离 | number\| string | No | All | Yes | -| width | 元素宽度 | number\| string | Yes | All | Yes | -| height | 元素高度 | number\| string | Yes | All | Yes | -| rx | 定义 x 轴上的半径 | number\| string | No | All | Yes | -| rx | 定义 y 轴上的半径 | number\| string | No | All | Yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :----: | :---------------: | :-------------: | -------- | -------- | ----------------- | +| x | 在 x 轴上平移距离 | number\| string | No | All | Yes | +| y | 在 y 轴上平移距离 | number\| string | No | All | Yes | +| width | 元素宽度 | number\| string | Yes | All | Yes | +| height | 元素高度 | number\| string | Yes | All | Yes | +| rx | 定义 x 轴上的半径 | number\| string | No | All | Yes | +| ry | 定义 y 轴上的半径 | number\| string | No | All | Yes | **Image**: 图像元素,支持 JPEG、PNG 格式 -| 名称 | 说明 | 类型 | 是否必填 | 原库平台 | 鸿蒙支持 | -| :----: | :---------------: | :-------------: | -------- | -------- | -------- | -| x | 在 x 轴上平移距离 | number\| string | No | All | Yes | -| y | 在 y 轴上平移距离 | number\| string | No | All | Yes | -| width | 元素宽度 | number\| string | Yes | All | Yes | -| height | 元素高度 | number\| string | Yes | All | Yes | -| href | 图像资源引用 | source\| string | Yes | All | Yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :----: | :---------------: | :-------------: | -------- | -------- | ----------------- | +| x | 在 x 轴上平移距离 | number\| string | No | All | Yes | +| y | 在 y 轴上平移距离 | number\| string | No | All | Yes | +| width | 元素宽度 | number\| string | Yes | All | Yes | +| height | 元素高度 | number\| string | Yes | All | Yes | +| href | 图像资源引用 | source\| string | Yes | All | Yes | -**公共属性**:Common props 组件属性支持情况 +**公共属性**:Common props 组件属性鸿蒙侧支持情况 -| 属性 | 说明 | 类型 | 默认值 | 是否必填 | 原库平台 | G | Path | Rect | -| :---------: | :----------------------------------: | :----: | :----: | :------: | -------- | --- | ---- | ---- | -| fill | 设置填充区域颜色 | string | '#000' | No | All | | √ | √ | -| stroke | 设置边框颜色,不设置时,默认没有边框 | string | 'none' | No | All | | √ | √ | -| strokeWidth | 设置边框宽度 | number | 1 | No | All | | √ | √ | +| Name | Description | Type | Default | Required | Platform | G | Path | Rect | +| :---------: | :----------------------------------: | :----: | :-----: | :------: | -------- | --- | ---- | ---- | +| fill | 设置填充区域颜色 | string | '#000' | No | All | | √ | √ | +| stroke | 设置边框颜色,不设置时,默认没有边框 | string | 'none' | No | All | | √ | √ | +| strokeWidth | 设置边框宽度 | number | 1 | No | All | | √ | √ | ## 遗留问题 -- [ ] svg 当前仅实现少部分属性(具体见上面已列出的属性),其余还未实现鸿蒙化 +- [ ] svg 当前仅实现少部分属性(具体见上面已列出的属性),其余还未实现鸿蒙化[issue#5](https://github.com/react-native-oh-library/react-native-svg/issues/5) ## 其他