Skip to content

feat: 添加 RTL 模式下的位置自动转换支持#2209

Merged
saint3347 merged 2 commits intomasterfrom
feat-rtl-position-support
Jan 30, 2026
Merged

feat: 添加 RTL 模式下的位置自动转换支持#2209
saint3347 merged 2 commits intomasterfrom
feat-rtl-position-support

Conversation

@saint3347
Copy link
Contributor

Summary

新增 RTL (Right-to-Left) 模式下弹出层组件的位置自动镜像转换功能:

  • src/config.ts 中新增 getRTLPosition 工具函数,自动在 RTL 模式下将 left/right 位置互换
  • ModalPopoverTooltip 组件支持 RTL 模式下的位置自动镜像
  • 版本号升级至 2.0.31-beta.4

Changes

  • src/config.ts: 新增 getRTLPosition 函数处理位置转换逻辑
  • src/Modal/events.tsx: 应用 RTL 位置转换
  • src/Popover/Panel.tsx: 应用 RTL 位置转换
  • src/Tooltip/Container.tsx: 应用 RTL 位置转换
  • package.json: 版本号升级
  • site/pages/documentation/changelog/2.x.x.md: 更新 changelog

Test plan

  • 验证在 RTL 模式下 Modal 的 position 为 left 时会自动转换为 right
  • 验证在 RTL 模式下 Popover 的 position 为 right 时会自动转换为 left
  • 验证在 RTL 模式下 Tooltip 位置显示正确
  • 验证在非 RTL 模式下所有组件的位置保持不变

🤖 Generated with Claude Code

saint3347 and others added 2 commits January 27, 2026 15:36
- 新增 getRTLPosition 工具函数,自动在 RTL 模式下转换 left/right 位置
- Modal/Popover/Tooltip 组件支持 RTL 模式下的位置镜像
- 版本号升级至 2.0.31-beta.4

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
添加 RTL 模式位置自动转换功能说明

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@saint3347 saint3347 merged commit 0764c1c into master Jan 30, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant