ant-design/ant-design-mobile
 Watch   
 Star   
 Fork   
26 days ago
ant-design-mobile

v5.43.0

v5.43.0

Features and Enhancements

  • Form: Add silent validation. #7057
  • Cascader: Support custom option rendering and rounded popup styling. #7055 #7050
  • Dropdown: Add onVisibleChange. #7064
  • Swiper: Report the switch source in onIndexChange, and improve loop and small-slide positioning. #7044 #7068 #7038
  • PasscodeInput: Support RTL input. #7039
  • FloatingPanel: Support an inertia factor. c426590b1
  • ErrorBlock: Generate SVG IDs dynamically. #7063
  • Input: Improve the enterKeyHint type. #7072
  • SwipeAction: Improve swipe interactions. #7051

Bug Fixes

  • Popover: Prevent ref.show() from closing immediately. #7073
  • Form: Handle a single child wrapped in an array. #7075
  • DatePicker: Fix December 1981 handling and the maximum year in week precision. #7037 2a3ba2071
  • Dropdown: Update position correctly on scroll and resize. #7049
  • Cascader: Sync external value changes. #7046
  • Segmented: Prevent the slider from exceeding its bounds. #7058
  • NoticeBar: Stop close-button clicks from propagating. #7059
  • SearchBar: Trigger search on Enter with an English IME. #7031 #7032
  • List: Fix arrow image configuration. #7041
  • Utils: Delay px converter initialization and avoid re-registering click-outside listeners when the handler changes. #7060 #7030

特性与优化

  • Form:新增静默校验。#7057
  • Cascader:支持自定义选项渲染和弹出层圆角样式。#7055 #7050
  • Dropdown:新增 onVisibleChange。#7064
  • Swiper:onIndexChange 增加切换来源参数,并优化循环和小尺寸幻灯片的定位。#7044 #7068 #7038
  • PasscodeInput:支持从右向左输入。#7039
  • FloatingPanel:支持惯性因子。c426590b1
  • ErrorBlock:动态生成 SVG ID。#7063
  • Input:完善 enterKeyHint 类型。#7072
  • SwipeAction:优化滑动交互。#7051

修复

  • Popover:修复 ref.show() 调用后立即关闭的问题。#7073
  • Form:支持数组包裹的单个子节点。#7075
  • DatePicker:修复 1981 年 12 月处理和 week 精度下最大年份计算的问题。#7037 2a3ba2071
  • Dropdown:修复滚动和调整窗口大小时的位置更新。#7049
  • Cascader:修复外部值变化时的同步。#7046
  • Segmented:修复滑块越界。#7058
  • NoticeBar:阻止关闭按钮点击事件冒泡。#7059
  • SearchBar:修复英文输入法下按 Enter 未触发搜索的问题。#7031 #7032
  • List:修复箭头图片配置判断。#7041
  • 工具函数:延迟初始化 px 转换器,并避免 click-outside 的 handler 变化时重复注册监听器。#7060 #7030
2026-01-09 10:50:52
ant-design-mobile

v5.42.3

Bug Fixes

  • Space: Fix unexpected additional negative for the last element. #7018

修复

  • Space: 修复最后一个元素带有非预期的负间距的问题。#7018
2026-01-08 11:00:27
ant-design-mobile

v5.42.2

Enhancements

  • VirtualInput: Not show outlined when active by focus(). #7005
  • VirtualInput: Adjust locale of backspace to make it meaning clear. #7016
  • MISC: Dynamic inertion element will not leave empty div when removed. #7011

Bug Fixes

  • Space: Fix additional margin for the last element when justify="center". #6995
  • VirtualInput: Compatible with React 16. #7012
  • VirtualInput: Compatible with ref call for legacy usage. #7010

优化

  • VirtualInput: 调用 focus() 方法聚焦时不再展示 outlined 样式。#7005
  • VirtualInput: 调整 backspace 本地化描述以使其更易于理解。#7016
  • 杂项: 动态创建的弹层元素在销毁时不再遗留空的 div 元素。#7011

修复

  • Space: 修复 justify="center" 时,最后一个元素有额外外间距的问题。#6995
  • VirtualInput: 兼容 React 16。#7012
  • VirtualInput: 兼容过去非标准的 ref 调用聚焦写法(使其不会丢失焦点)。#7010
2025-12-10 14:08:30
ant-design-mobile

v5.42.1

Bug Fixes

  • Tabs: Fix focus lose by press keyboard when work with PasscodeInput. #7004

修复

  • VirtualInput: 修复与 PasscodeInput 配合使用时,点击键盘会失去焦点的问题。#7004
2025-11-05 11:43:45
ant-design-mobile

v5.42.0

Features

  • VirtulInput: customKey support additional config title to enhance a11y experince. #6956
  • Image: mask support onClick event. #6937

Enhancements

  • Style: Patch more css variables on the Modal & Drawer components. #6955
  • VirtualInput: Avoid screen reader reads keybarod content. #6954 #6977

Bug Fixes

  • Tabs: Programmatic control should not auto focus. #6952
  • Uploader: Fix maxCount not limit uploading files. #6989
  • VirtualInput: Fix click on the part area not get focused. #6990
  • VirtualInput: Remove useless input height style to make more easy to override. #6994

特性

  • VirtulInput: customKey 支持配置 title 以提升无障碍体验。#6956
  • Image: mask 支持 onClick 事件。#6937

优化

  • 样式: 为 Modal 与 Drawer 支持更多 CSS 变量。#6955
  • VirtualInput: 优化读屏器会额外阅读键盘内容的问题。#6954 #6977

修复

  • Tabs: 受控切换焦点页不再自动获得焦点。#6952
  • Uploader: 修复 maxCount 对正在上传的文件限制不生效的问题。#6989
  • VirtualInput: 修复部分区域点击无法获得焦点的问题。#6990
  • VirtualInput: 移除非必要样式以便于开发者更好覆盖。#6994
2025-09-25 10:58:33
ant-design-mobile

v5.41.1

Enhancements

  • Tabs: Not auto focus tab when activeKey changed by control. #6952

优化

  • Tabs: 受控更改 activeKey 时,不再自动聚焦对应 Tab。#6952
2025-09-24 16:31:18
ant-design-mobile

v5.41.0

Features

  • Ellipsis: Support onEllipsis callback. #6893
  • Tabs: Support keyboard navigation for a11y. #6895
  • Calendar: Support cellRender for customize cell content. #6924
  • ImageViewer: imageRender support additional ref param for pass to customize content. #6904

Enhancements

  • VirtualInput: Caret position compatible with controlled mode. #6891 #6897 #6926 #6948 #6949
  • Swiper: Optimize the render logic to not to re-mount content when key reorder. #6929
  • Calendar: Not show switch button when prevMonthButton nextMonthButton prevYearButton nextYearButton is null. #6944

Bug Fixes

  • DatePicker: Fix format string not correct when `precision="week" with some case. #6906
  • Swiper: Fix vertical virtual scroll not working as expect/ #6882
  • Ellipsis: Fix warning for useLayoutEffect when in SSR. #6923
  • TextArea: Fix enterKeyHint not working for the first focus. #6917
  • Avatar: Fix not show fallback when src is empty text. #6935

特性

  • Ellipsis:支持 onEllipsis 回调。#6893
  • Tabs:支持无障碍(a11y)的键盘导航。#6895
  • Calendar:支持 cellRender 自定义单元格内容。#6924
  • ImageViewer:imageRender 额外支持传入 ref 参数用于自定义内容。#6904

优化

  • VirtualInput:光标位置在受控模式下保持兼容。#6891 #6897 #6926 #6948 #6949
  • Swiper:优化渲染逻辑,key 重新排序时不重新挂载内容。#6929
  • Calendar:当 prevMonthButton、nextMonthButton、prevYearButton、nextYearButton 为 null 时不显示切换按钮。#6944

修复

  • DatePicker:修复 precision="week" 时某些情况下格式字符串不正确的问题。#6906
  • Swiper:修复垂直虚拟滚动不生效的问题。#6882
  • Ellipsis:修复 SSR 环境中 useLayoutEffect 的警告。#6923
  • TextArea:修复首次聚焦时 enterKeyHint 不生效的问题。#6917
  • Avatar:修复 src 为空字符串时不显示后备内容的问题。#6935
2025-06-23 14:47:07
ant-design-mobile

v5.40.0

Features

  • React: Support unstableSetRender to compatible with React 19. #6860
  • VirtualInput: Support change cursor position. #6843
  • Locale: Improve Calendar & other mistake Russian locale. #6838
  • DatePicker: renderLabel support third param for selected state. #6880

Enhancements

  • NumberKeyboard: Support css variable config --adm-safe-area-multiple. #6844
  • Button: Support form props. #6855
  • Calendar: Adjust description to show that user can select range for the same date. #6886

Bug Fixes

  • Space: Fix style issue about additional margin at last element. #6841

特性

  • React: 支持 unstableSetRender 属性以配置兼容 React 19。#6860
  • VirtualInput: 支持设置光标位置。6843
  • Locale: 国际化改进俄语相关翻译。#6838
  • DatePicker: renderLabel 属性支持额外参数获取选中状态。#6880
  • Calendar: 范围选择调整描述以让用户感知可以选择同一天。#6886

优化

  • NumberKeyboard: 支持配置 --adm-safe-area-multiple css 变量以调整安全区域间距。#6844
  • Button: 支持 form 属性以关联表单。#6855

修复

  • Space: 修复最后一个元素后方有额外空间占位的问题。#6841
2025-03-11 16:25:46
ant-design-mobile

v5.39.0

Features

  • CalendarPickerView: renderTop & renderBottom support false to skip render. #6735
  • PasscodeInput: Add inputMode to support customize keyboard mode. #6780
  • SwipeAction: Support onClose event. #6812
  • FloatingPanel: Support placement for top or bottom position. #6829
  • ImageViewer: Support imageRender for customize popup view. #6825

Bug Fixes

  • ImageUploader: Fix onChange not correct trigger when part of file upload failed. #6779
  • Popover: Fix autoUpdate not working when defaultVisible is false. 679e9741
  • DatePicker: Fix the edge case for week select that date selection not correct. #6808
  • Ellipsis: Fix ellipsis sometime not take fully line width for multiple rows. #6797

特性

  • CalendarPickerView: renderTop & renderBottom 支持通过 false 跳过渲染。#6735
  • PasscodeInput: 新增 inputMode 属性,用于支持自定义输入法模式。#6780
  • SwipeAction: 支持 onClose 事件。#6812
  • FloatingPanel: 支持 placement 属性,可设置面板弹出位置为顶部或底部。#6829
  • ImageViewer: 支持 imageRender 属性,用于自定义弹出视图。#6825

修复

  • ImageUploader: 修复部分文件上传失败时 onChange 未正确触发的问题。#6779
  • Popover: 修复当 defaultVisible 为 false 时,autoUpdate 不生效的问题。679e9741
  • DatePicker: 修复在选择周的场景下,日期选择不正确的边界问题。#6808
  • Ellipsis: 修复多行省略时,有时未完全占用行宽的问题。#6797
2024-10-29 14:54:33
ant-design-mobile

v5.38.1

Bug Fixes

  • Ellipsis: Refactor with React life cycle hooks to avoid render not correct in Suspense. #6770
  • Ellipsis: Add word-break style to fix long text not take ellipsis. #6771

修复

  • Ellipsis: 改用 React 生命周期方法以避免 Suspense 下渲染不一致的问题。#6770
  • Ellipsis: 添加 word-break 样式以修复部分长文本不会省略的问题。#6771