Skip to content

Commit 75efcea

Browse files
committed
docs: refine bilingual README branding
1 parent cac19fa commit 75efcea

2 files changed

Lines changed: 23 additions & 25 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/dropdown</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>🔽 A trigger-driven dropdown component for React.</p>
65
</div>
76

README.zh-CN.md

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<div align="center">
22
<h1>@rc-component/dropdown</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 下拉菜单基础组件,基于 trigger 和 menu 能力构建。</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 下拉菜单基础组件,基于 trigger 和 menu 能力构建。</p>
65
</div>
76

87
<p align="center"><a href="./README.md">English</a> | 简体中文</p>
@@ -30,9 +29,9 @@
3029
## 特性
3130

3231
- Built on `@rc-component/trigger`.
33-
- 支持 hover, click, context menu, and custom trigger actions.
34-
- Accepts a React element or render function as dropdown overlay.
35-
- 支持 align point behavior and trigger-width matching.
32+
- 支持悬停、单击、上下文菜单和自定义触发操作。
33+
- 接受 React 元素或渲染函数作为下拉覆盖。
34+
- 支持对齐点行为和触发宽度匹配。
3635

3736
## 安装
3837

@@ -66,26 +65,26 @@ npm start
6665

6766
## API
6867

69-
Additional props are passed to the underlying [`@rc-component/trigger`](https://github.com/react-component/trigger) component.
68+
额外属性会透传给底层 [`@rc-component/trigger`](https://github.com/react-component/trigger) 组件。
7069

7170
| 参数 | 说明 | 类型 | 默认值 |
7271
| --- | --- | --- | --- |
73-
| alignPoint | Align popup to the click point | boolean | false |
74-
| animation | Popup animation name | string | - |
75-
| defaultVisible | Initial visible state | boolean | - |
76-
| getPopupContainer | Container where dropdown is rendered | `(node: HTMLElement) => HTMLElement` | `() => document.body` |
77-
| minOverlayWidthMatchTrigger | Whether overlay width should be at least trigger width | boolean | `true` unless `alignPoint` is set |
78-
| openClassName | Class name added to trigger when dropdown is open | string | `${prefixCls}-open` |
72+
| alignPoint | 将弹层窗口与点击点对齐 | boolean | false |
73+
| 动画片 | 弹层动画名称 | string | - |
74+
| defaultVisible | 初始可见状态 | boolean | - |
75+
| getPopupContainer | 呈现下拉列表的容器 | `(node: HTMLElement) => HTMLElement` | `() => document.body` |
76+
| minOverlayWidthMatchTrigger | 覆盖宽度是否至少应为触发宽度 | boolean | `true` 除非设置了 `alignPoint` |
77+
| openClassName | 打开下拉菜单时添加到触发器的className称 | string | `${prefixCls}-open` |
7978
| overlay | Dropdown overlay | `React.ReactElement \| (() => React.ReactElement)` | - |
80-
| overlayClassName | Additional overlay class name | string | - |
81-
| overlayStyle | Overlay style | `React.CSSProperties` | - |
79+
| overlayClassName | 附加覆盖className称 | string | - |
80+
| overlayStyle | 叠加样式 | `React.CSSProperties` | - |
8281
| placement | Dropdown placement | string | `bottomLeft` |
83-
| prefixCls | Component class name prefix | string | `rc-dropdown` |
84-
| transitionName | Popup transition class name | string | - |
85-
| trigger | Trigger action | `ActionType \| ActionType[]` | `['hover']` |
86-
| visible | Controlled visible state | boolean | - |
87-
| onOverlayClick | Callback when overlay is clicked | `(event: React.MouseEvent) => void` | - |
88-
| onVisibleChange | Callback when visibility changes | `(visible: boolean) => void` | - |
82+
| prefixCls | 组件className前缀 | string | `rc-dropdown` |
83+
| transitionName | 弹层过渡className称 | string | - |
84+
| 扳机 | 触发动作 | `ActionType \| ActionType[]` | `['hover']` |
85+
| 可见的 | 受控可见状态 | boolean | - |
86+
| onOverlayClick | 点击覆盖时的回调 | `(event: React.MouseEvent) => void` | - |
87+
| onVisibleChange | 可见性变化时的回调 | `(visible: boolean) => void` | - |
8988

9089
## 本地开发
9190

@@ -108,8 +107,8 @@ npm run build
108107
npm run prepublishOnly
109108
```
110109

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

113112
## 许可证
114113

115-
@rc-component/dropdown is released under the [MIT](./LICENSE) license.
114+
@rc-component/dropdown 基于 [MIT](./LICENSE) 许可证发布。

0 commit comments

Comments
 (0)