From 4614c38b9080588bd01bfbbb4cdfeeef865f94a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98bug123?= <1518171514@qq.com> Date: Fri, 5 Jan 2024 10:49:24 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20rn-s?= =?UTF-8?q?ection-list-get-item-layout.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rn-section-list-get-item-layout.md | 91 ------------------------------ 1 file changed, 91 deletions(-) delete mode 100644 rn-section-list-get-item-layout.md diff --git a/rn-section-list-get-item-layout.md b/rn-section-list-get-item-layout.md deleted file mode 100644 index d855becb..00000000 --- a/rn-section-list-get-item-layout.md +++ /dev/null @@ -1,91 +0,0 @@ -> 模板版本:v0.1.2 - -

-

rn-section-list-get-item-layout

-

-

- - Supported platforms - - - License - -

- ->[!tip] [Github 地址](https://github.com/jsoendermann/rn-section-list-get-item-layout) - -## 安装与使用 - -进入到工程目录并输入以下命令: - - - -#### **yarn** - -```bash -yarn add react-native-section-list-get-item-layout -``` -#### **npm** - -```bash -npm install react-native-section-list-get-item-layout -``` - - - -下面的代码展示了这个库的基本使用场景: - -```js -import sectionListGetItemLayout from 'react-native-section-list-get-item-layout' - -class MyComponent extends React.Component { - constructor(props) { - super(props) - - this.getItemLayout = sectionListGetItemLayout({ - // The height of the row with rowData at the given sectionIndex and rowIndex - getItemHeight: (rowData, sectionIndex, rowIndex) => sectionIndex === 0 ? 100 : 50, - - // These four properties are optional - getSeparatorHeight: () => 1 / PixelRatio.get(), // The height of your separators - getSectionHeaderHeight: () => 20, // The height of your section headers - getSectionFooterHeight: () => 10, // The height of your section footers - listHeaderHeight: 40, // The height of your list header - }) - } - - render() { - return ( - - ) - } -} -``` - -## 约束与限制 - -### 兼容性 - - 在下述版本验证通过: - - 1. IDE:DevEco Studio 4.1.3.313;SDK:OpenHarmony(api11) 4.1.0.52;测试设备:Mate40 Pro(NOH-AN00);ROM:2.0.0.51(SP22C00E52R1P17log);RNOH:0.72.11 - -## API - -详情见 [rn-section-list-get-item-layout源库地址](https://github.com/jsoendermann/rn-section-list-get-item-layout) - -| 名称 | 说明 | 类型 | 是否必填 | 原库平台 | 鸿蒙支持 | -| ---- | ---- | ---- | -------- | -------- | -------- | -| sectionListGetItemLayout({getItemHeight, getSeparatorHeight, getSectionHeaderHeight,getSectionFooterHeight,listHeaderHeight}) |This package provides a function that helps you construct the getItemLayout function for your SectionLists. For an explanation of why this exists, see this post. It's meant to be used like this | function | Yes | / | Yes | - - -## 遗留问题 - -## 其他 - -## 开源协议 - -本项目基于 [The MIT License (MIT)](https://github.com/jsoendermann/rn-section-list-get-item-layout/blob/master/LICENSE) ,请自由地享受和参与开源。 -- Gitee From 1a74f11fe4cffe3cab95058b3857f36c61ff8a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98bug123?= <1518171514@qq.com> Date: Fri, 5 Jan 2024 10:50:09 +0000 Subject: [PATCH 2/2] =?UTF-8?q?[Issues:=20#I8TT3D]=20=E6=B7=BB=E5=8A=A0rn-?= =?UTF-8?q?section-list-get-item-layout=E6=96=87=E6=A1=A3ROMM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh-cn/rn-section-list-get-item-layout.md | 91 ++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 zh-cn/rn-section-list-get-item-layout.md diff --git a/zh-cn/rn-section-list-get-item-layout.md b/zh-cn/rn-section-list-get-item-layout.md new file mode 100644 index 00000000..220f3e29 --- /dev/null +++ b/zh-cn/rn-section-list-get-item-layout.md @@ -0,0 +1,91 @@ +> 模板版本:v0.1.2 + +

+

rn-section-list-get-item-layout

+

+

+ + Supported platforms + + + License + +

+ +>[!tip] [Github 地址](https://github.com/jsoendermann/rn-section-list-get-item-layout) + +## 安装与使用 + +进入到工程目录并输入以下命令: + + + +#### **yarn** + +```bash +yarn add react-native-section-list-get-item-layout +``` +#### **npm** + +```bash +npm install react-native-section-list-get-item-layout +``` + + + +下面的代码展示了这个库的基本使用场景: + +```js +import sectionListGetItemLayout from 'react-native-section-list-get-item-layout' + +class MyComponent extends React.Component { + constructor(props) { + super(props) + + this.getItemLayout = sectionListGetItemLayout({ + // The height of the row with rowData at the given sectionIndex and rowIndex + getItemHeight: (rowData, sectionIndex, rowIndex) => sectionIndex === 0 ? 100 : 50, + + // These four properties are optional + getSeparatorHeight: () => 1 / PixelRatio.get(), // The height of your separators + getSectionHeaderHeight: () => 20, // The height of your section headers + getSectionFooterHeight: () => 10, // The height of your section footers + listHeaderHeight: 40, // The height of your list header + }) + } + + render() { + return ( + + ) + } +} +``` + +## 约束与限制 + +### 兼容性 + + 在下述版本验证通过: + + 1. IDE:DevEco Studio 4.1.3.313;SDK:OpenHarmony(api11) 4.1.0.52;测试设备:Mate40 Pro(NOH-AN00);ROM:2.0.0.52(C00E52R1P17log);RNOH:0.72.11 + +## API + +详情见 [rn-section-list-get-item-layout源库地址](https://github.com/jsoendermann/rn-section-list-get-item-layout) + +| 名称 | 说明 | 类型 | 是否必填 | 原库平台 | 鸿蒙支持 | +| ---- | ---- | ---- | -------- | -------- | -------- | +| sectionListGetItemLayout({getItemHeight, getSeparatorHeight, getSectionHeaderHeight,getSectionFooterHeight,listHeaderHeight}) |This package provides a function that helps you construct the getItemLayout function for your SectionLists. For an explanation of why this exists, see this post. It's meant to be used like this | function | Yes | / | Yes | + + +## 遗留问题 + +## 其他 + +## 开源协议 + +本项目基于 [The MIT License (MIT)](https://github.com/jsoendermann/rn-section-list-get-item-layout/blob/master/LICENSE) ,请自由地享受和参与开源。 -- Gitee