Skip to content

Commit 5341593

Browse files
committed
docs: refine bilingual README branding
1 parent 2597425 commit 5341593

2 files changed

Lines changed: 20 additions & 22 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<div align="center">
22
<h1>@rc-component/virtual-list</h1>
3-
<p><sub>Part of the Ant Design ecosystem.</sub></p>
4-
<img alt="Ant Design" height="32" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" />
3+
<p><sub><img alt="Ant Design" height="14" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" style="vertical-align: -0.125em;" /> Part of the Ant Design ecosystem.</sub></p>
54
<p>📜 Virtual scrolling list component for React.</p>
65
<p>
76
<a href="https://www.npmjs.com/package/@rc-component/virtual-list"><img src="https://img.shields.io/npm/v/@rc-component/virtual-list.svg?style=flat-square" alt="npm version" /></a>

README.zh-CN.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<div align="center">
22
<h1>@rc-component/virtual-list</h1>
3-
<p><sub>Ant Design 生态的一部分。</sub></p>
4-
<img alt="Ant Design" height="32" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" />
5-
<p>🧾 React 虚拟列表组件,用于高性能渲染长列表。</p>
3+
<p><sub><img alt="Ant Design" height="14" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" style="vertical-align: -0.125em;" /> Ant Design 生态的一部分。</sub></p>
4+
<p>📜 React 虚拟列表组件,用于高性能渲染长列表。</p>
65
<p>
76
<a href="https://www.npmjs.com/package/@rc-component/virtual-list"><img src="https://img.shields.io/npm/v/@rc-component/virtual-list.svg?style=flat-square" alt="npm version" /></a>
87
<a href="https://www.npmjs.com/package/@rc-component/virtual-list"><img src="https://img.shields.io/npm/dm/@rc-component/virtual-list.svg?style=flat-square" alt="npm downloads" /></a>
@@ -18,10 +17,10 @@
1817

1918
## 特性
2019

21-
- Built for React and maintained by the rc-component team.
20+
- 面向 React 构建,并由 rc-component 团队维护。
2221
- 被 Ant Design 使用和其他 React 组件库使用。
23-
- 提供 TypeScript declarations with both ES module and CommonJS outputs.
24-
- 保留 examples, tests, and preview builds aligned with the package source.
22+
- 提供 TypeScript 类型声明,同时输出 ES module CommonJS 产物。
23+
- 示例、测试和预览构建与包源码保持一致。
2524

2625
## 安装
2726

@@ -48,7 +47,7 @@ export default () => (
4847

4948
## 示例
5049

51-
Run the local dumi site to explore the examples:
50+
运行本地 dumi 站点查看示例:
5251

5352
```bash
5453
npm install
@@ -61,17 +60,17 @@ npm start
6160

6261
| 属性 | 说明 | 类型 | 默认值 |
6362
| ---------- | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | ------- |
64-
| children | Render function for each item. The third argument contains measuring props used by legacy browser compatibility paths. | `(item, index, props) => ReactElement` | - |
65-
| component | Custom list container element. | `string` \| `ComponentType` | `div` |
66-
| data | Items rendered by the virtual list. | `T[]` | - |
67-
| disabled | Disable scroll position checks, usually while coordinating animation. | `boolean` | `false` |
68-
| fullHeight | Whether the holder should keep full height. | `boolean` | `true` |
69-
| height | Visible list height. | `number` | - |
70-
| itemHeight | Minimum item height used to calculate the virtual range. | `number` | - |
71-
| itemKey | Key field or key getter for items. | `string` \| `(item) => React.Key` | - |
72-
| onScroll | Called when the list scrolls. | `React.UIEventHandler<HTMLElement>` | - |
73-
| styles | Custom scrollbar part styles. | `object` | - |
74-
| virtual | Enable virtual rendering. | `boolean` | `true` |
63+
| children | 每一项的渲染函数。第三个参数包含旧浏览器兼容路径使用的测量 props | `(item, index, props) => ReactElement` | - |
64+
| component | 自定义列表容器元素。 | `string` \| `ComponentType` | `div` |
65+
| data | 虚拟列表渲染的数据项。 | `T[]` | - |
66+
| disabled | 禁用滚动位置检查,通常用于配合动画。 | `boolean` | `false` |
67+
| fullHeight | holder 是否保持完整高度。 | `boolean` | `true` |
68+
| height | 可视列表高度。 | `number` | - |
69+
| itemHeight | 用于计算虚拟范围的最小项高度。 | `number` | - |
70+
| itemKey | 数据项 key 字段或 key 获取函数。 | `string` \| `(item) => React.Key` | - |
71+
| onScroll | 列表滚动时调用。 | `React.UIEventHandler<HTMLElement>` | - |
72+
| styles | 自定义滚动条部位样式。 | `object` | - |
73+
| virtual | 启用虚拟渲染。 | `boolean` | `true` |
7574

7675
## 本地开发
7776

@@ -88,8 +87,8 @@ npm run build
8887
npm run prepublishOnly
8988
```
9089

91-
The release flow is handled by `@rc-component/np` through the `rc-np` command after the package build.
90+
包构建完成后,发布流程由 `@rc-component/np` 通过 `rc-np` 命令处理。
9291

9392
## 许可证
9493

95-
@rc-component/virtual-list is released under the [MIT](./LICENSE) license.
94+
@rc-component/virtual-list 基于 [MIT](./LICENSE) 许可证发布。

0 commit comments

Comments
 (0)