From c8c7c8de60c876e41da60996a47705a6c120cf01 Mon Sep 17 00:00:00 2001 From: severnking <2523913042@qq.com> Date: Mon, 15 Jul 2024 21:11:37 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20[Issues:#IABHFV]=E6=96=B0=E5=A2=9Ereact?= =?UTF-8?q?-native-easy-grid=E6=8C=87=E5=AF=BC=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh-cn/react-native-easy-grid.md | 188 ++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 zh-cn/react-native-easy-grid.md diff --git a/zh-cn/react-native-easy-grid.md b/zh-cn/react-native-easy-grid.md new file mode 100644 index 00000000..5b3ba773 --- /dev/null +++ b/zh-cn/react-native-easy-grid.md @@ -0,0 +1,188 @@ + + +> 模板版本:v0.2.2 + +

+

react-native-share

+

+

+ + Supported platforms + + + License + +

+ +> [!TIP] [Github 地址](https://github.com/GeekyAnts/react-native-easy-grid) + + +## 安装与使用 + +进入到工程目录并输入以下命令: + +#### **npm** + +```bash +npm install react-native-easy-grid@0.2.2 +``` + +#### **yarn** + +```bash +yarn add react-native-easy-grid@0.2.2 +``` + + + +#### **导入组件** + +```js + +import { Col, Row, Grid } from "react-native-easy-grid"; + +``` + +下面的代码展示了这个库的基本使用场景: + +> [!WARNING] 使用时 import 的库名不变。 + + +1. 两列等宽(50% and 50%)布局 + +```js + +import { Col, Row, Grid } from "react-native-easy-grid"; + + + + + + +``` + +2.两行等高(50% and 50%)布局 + +```js + + + + + + + +``` + +3. 两行占比(75% and 25%)布局 + +```js + + + + + + +``` + +4.三列占比(33.33%)布局 + +```js + + + + + + + +``` + +5.嵌套布局 + +```js + + + 1 + + + + 2 + + + 3 + + + + +``` + +6.固定宽度和动态宽度组合 + +```js + + + Fixed width + + + Fluid width + + + +``` + +7.固定高度和动态高度组合 + +```js + + + Fixed width + + + Fluid width + + + +``` + + +## 约束与限制 + +##### 兼容性 + +本文档内容基于以下版本验证通过: + +RNOH: 0.72.27; SDK: HarmonyOS-NEXT Developer Beta1 5.0.0.25 ; IDE: DevEco Studio 5.0.3.400SP7; ROM: 3.0.0.25; + +## 组件 + +> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 + +> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 + +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ---- | ----------- | ---- | -------- | -------- | ------------------ | +| Grid | 网格组件 | Component | yes | iOS,Android | yes | +| Col | 列块组件 | Component | yes | iOS,Android | yes | +| Row | 行块组件 | Component | yes | iOS,Android | yes | + + +## 属性、方法 + +> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 + +> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 + +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ---- | ----------- | ---- | -------- | -------- | ------------------ | +| style |组件CSS样式 | Object | yes | iOS,Android | yes | +| size |组件布局占比 | number | no | iOS,Android | yes | +| onPress:() => void |点击事件 | function | no | iOS,Android | yes | + + + +## 遗留问题 + +## 开源协议 + +本项目基于 [The MIT License (MIT)](https://github.com/GeekyAnts/react-native-easy-grid/blob/master/LICENSE) ,请自由地享受和参与开源。 + + -- Gitee