diff --git a/vmall/react-native-fast-image.md b/vmall/react-native-fast-image.md index 8d02984f3366696c057a0ca7de3da26c3ba1df35..e68f9f418a1127edcf4779a931c0c7b9e3a8edd6 100644 --- a/vmall/react-native-fast-image.md +++ b/vmall/react-native-fast-image.md @@ -1,4 +1,4 @@ -> 模板版本:v0.1.1 +> 模板版本:v0.1.2

react-native-fast-image

@@ -207,6 +207,8 @@ ohpm install 然后编译、运行即可。 +## 约束与限制 + ## 兼容性 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 @@ -215,28 +217,36 @@ ohpm install ## 属性 -| 名称 | 说明 | 类型 | 是否必填 | 原库平台 | 鸿蒙支持 | -| ------------------------------ | ----------------------------------------------------------------------------------------- | ---------------- | -------- | -------- | -------- | -| `source.uri` | Source for the remote image to load. | string | yes | All | yes | -| `source.headers?` | Headers to load the image with. e.g. { Authorization: 'someAuthToken' }. | object | yes | All | yes | -| `source.priority?` | loading url priority | enum | No | All | no | -| `source.cache?` | setting loading url cache mode | enum | No | All | no | -| `defaultSource?` | An asset loaded with require(...). | number | yes | All | yes | -| `resizeMode?` | loading image for scale mode | enum | yes | ALL | yes | -| `onLoadStart?: () => void` | Called when the image starts to load. | function | yes | ALL | yes | -| `onProgress?: (event) => void` | Called when the image is loading. | function | yes | All | yes | -| `onLoad?: (event) => void` | Called on a successful image fetch. Called with the width and height of the loaded image. | function | yes | All | yes | -| `onError?: () => void` | Called on an image fetching error. | function | yes | All | yes | -| `onLoadEnd?: () => void` | Called when the image finishes loading, whether it was successful or an error. | function | yes | All | yes | -| `tintColor?` | If supplied, changes the color of all the non-transparent pixels to the given color. | number \| string | yes | All | yes | +> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 + +> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 + +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ------------------------------ | ----------------------------------------------------------------------------------------- | ---------------- | -------- | -------- | ----------------- | +| `source.uri` | Source for the remote image to load. | string | yes | All | yes | +| `source.headers?` | Headers to load the image with. e.g. { Authorization: 'someAuthToken' }. | object | yes | All | yes | +| `source.priority?` | loading url priority | enum | No | All | no | +| `source.cache?` | setting loading url cache mode | enum | No | All | no | +| `defaultSource?` | An asset loaded with require(...). | number | yes | All | yes | +| `resizeMode?` | loading image for scale mode | enum | yes | ALL | yes | +| `onLoadStart?: () => void` | Called when the image starts to load. | function | yes | ALL | yes | +| `onProgress?: (event) => void` | Called when the image is loading. | function | yes | All | yes | +| `onLoad?: (event) => void` | Called on a successful image fetch. Called with the width and height of the loaded image. | function | yes | All | yes | +| `onError?: () => void` | Called on an image fetching error. | function | yes | All | yes | +| `onLoadEnd?: () => void` | Called when the image finishes loading, whether it was successful or an error. | function | yes | All | yes | +| `tintColor?` | If supplied, changes the color of all the non-transparent pixels to the given color. | number \| string | yes | All | yes | ## 静态方法 -| 名称 | 说明 | 类型 | 是否必填 | 原库平台 | 鸿蒙支持 | -| ------------------------------------------------- | ------------------------------------------ | -------- | -------- | -------- | -------- | -| `FastImage.preload: (source[]) => void` | Preload images to display later. e.g. | function | No | All | No | -| `FastImage.clearMemoryCache: () => Promise` | Clear all images from memory cache. | function | No | All | no | -| `FastImage.clearDiskCache: () => Promise` | Clear all images from disk cache. priority | function | No | All | no | +> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 + +> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 + +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ------------------------------------------------- | ------------------------------------------ | -------- | -------- | -------- | ----------------- | +| `FastImage.preload: (source[]) => void` | Preload images to display later. e.g. | function | No | All | No | +| `FastImage.clearMemoryCache: () => Promise` | Clear all images from memory cache. | function | No | All | no | +| `FastImage.clearDiskCache: () => Promise` | Clear all images from disk cache. priority | function | No | All | no | ## 遗留问题