Skip to content

Releases: ant-design/ant-design-mobile

v5.12.5

20 May 07:29
Compare
Choose a tag to compare

Features

  • 747fa23 [Calendar] Add shouldDisableDate prop (#5198)
  • 08562ec [Image] Add draggable props which defaults to false

Enhancements

  • e7632d2 [ActionSheet] Refactor the implementation and adjust style
  • 481f0a5 [ActionSheet] Adjust DOM structure and update tests
  • 84923eb Upgrade @floating-ui/dom to 0.5

Bug Fixes

  • 94b5b8f [Popover] Fix position not correct when target element is position fixed and popover content is very long
  • e8e2810 [Form] Fallback label to empty string in validation messages
  • 88bba8f [TextArea] Input Chinese in firefox when maxLength is set (#5209)

特性

  • 747fa23 [Calendar] 增加了 shouldDisableDate 属性 (#5198)
  • 08562ec [Image] 增加了 draggable 属性,默认为 false

优化

  • e7632d2 481f0a5 [ActionSheet] 调整了样式和 DOM 结构,底层不再依赖 Button 组件
  • 84923eb 升级 @floating-ui/dom 到 0.5

修复

  • 94b5b8f [Popover] 修复了当目标元素是 fixed 定位且 Popover 内容很长时,可能出现定位错误的问题
  • e8e2810 [Form] 当 label 为 ReactNode 时,校验信息中的 label内容会自动 fallback 为空字符串,避免出现undefined` 文案
  • 88bba8f [TextArea] 修复了在 FireFox 中,当 TextArea 设置了 maxLength 时,无法输入中文的问题 (#5209)

v5.12.4

17 May 07:27
Compare
Choose a tag to compare

Features

  • [Button] supports native onMouseDown onMouseUp onTouchStart onTouchEnd props d94c692

Enhancements

  • [Badge] adjust the implementation of Badge.dot to prevent ts errors 81d6491
  • [Image] update the loading and broken placeholder icon 1aee619
  • [Button] adjust the type of onClick 7b2d503
  • [Toast] update max-width af26f62

Bug Fixes

  • [InfiniteScroll] if the scroll parent changes, InfiniteScroll should move the event handler to the new scroll parent f188a2b
  • [SearchBar] onCancel should be able to trigger now #5201 b66911e 8337f70

特性

  • [Button] 支持了原生 button 元素的 onMouseDown onMouseUp onTouchStart onTouchEnd 属性 d94c692

优化

  • [Badge] 调整了 Badge.dot 的实现方式,避免出现 ts 报错 81d6491
  • [Image] 更新了加载和错误时的占位图 1aee619
  • [Button] 调整了 onClick 的类型 7b2d503
  • [Toast] 调整了 max-width af26f62

修复

  • [InfiniteScroll] 当外层滚动元素发生变化时,现在 InfiniteScroll 可以正常切换事件绑定的对象并且触发加载逻辑了 f188a2b
  • [SearchBar] 修复了 onCancel 事件无法触发的问题 #5201 b66911e 8337f70

v5.12.3

16 May 10:34
Compare
Choose a tag to compare

Enhancements

  • [Badge] adjust ts definition #5195

Bug Fixes

  • downgrade @use-gesture/react to 10.2.12 to fix body get scroll locked after open a new page #5190 f7f1fc4
  • more strict scroll element check in getScrollParent to prevent issues like #5187 0d83349
  • [Calendar] click the date in prev or next month should jump to the target month and trigger select 0030bd4

优化

  • [Badge] 调整了 ts 定义 #5195

修复

  • 临时锁住 @use-gesture/react 的版本,避免出现跳转新页面后旧页面滚动被锁死的问题 #5190 f7f1fc4
  • 在 getScrollParent 中调整了元素是否可以滚动的检查逻辑,避免出现类似于 #5187 的问题 0d83349
  • [Calendar] 修复了点击前一个月或后一个月的日期时,无法触发选择和跳转的问题 0030bd4

v5.12.2

12 May 14:00
Compare
Choose a tag to compare
  • 特性
    • Tabs 增加了 --active-title-color--active-line-color CSS 变量 #5185
  • 优化
    • Image 的 src 属性现在调整为可选了 6184cfb
    • SearchBar 的取消按钮移除了不必要的 preventDefault 逻辑,避免出现报错 de25b2d
    • 一些 @types/xxx 的依赖现在从 dependencies 改为 devDependencies 了,避免影响宿主项目环境 ba87a93
  • 修复
    • 修复了一些组件中 maskStyle 属性的类型和 Mask 不一致的问题 #5175
    • 修复了 Dropdown 箭头图标没有居中的问题 #5184

v5.12.1

11 May 11:32
Compare
Choose a tag to compare
  • 修复
    • 调整了 createRoot 的引入逻辑,避免在 webpack 打包时出现 Can't resolve 'react-dom/client' 的 warning 信息 #5182

v5.12.0

11 May 07:42
Compare
Choose a tag to compare
  • 特性
    • Calendar 支持了配置年月切换按钮的内容 #5149
    • Picker 增加了 popupClassNamepopupStyle 属性 #5156
    • Input 和 TextArea 支持了原生的 name 属性 74a1d28
    • Picker DatePicker CascadePicker 支持了 ref,同时 children 渲染函数增加了第二个参数 actions,现在可以很方便的控制 Picker 组件的展开收起了,详见 Picker 文档 #5161
    • 对 React 18 做了一些最基本的兼容处理 #5046
    • Picker 增加了 forceRenderdestroyOnClose 属性 #5164
    • Form 的 onClick 事件函数中,增加了第二个参数 widgetRef,可以用来直接获取到内部表单控件组件的 ref,配合 Picker 使用可以很大程度上简化逻辑,详见 Form 文档 #5166 ac5a862
  • 优化
    • 避免 TextArea 在 SSR 环境下出现 useLayoutEffect 相关的 warning 26cffc1
    • List 组件现在会在内部自己设置 line-height 样式,避免被外部样式意外干扰 #5165
    • 移除了一些没有实际用处的 display: unset 样式 4bd535a 626cbf5
  • 修复
    • 修复了当父元素是 flex 布局时,Tabs JumboTabs CapsuleTabs 左右滚动失效的问题 #5145 #5172
    • 修复了 ImageUploader 当连续选择同一张图片时,beforeUpload 第二次没有触发的问题 #5163 c1cfdde

v5.11.2

05 May 11:57
Compare
Choose a tag to compare
  • 修复
    • 修复了 VirtualInput 组件在长按虚拟键盘时可能会意外收起键盘的问题 97398a0
    • 修复了 TextArea 在部分情况下可能会在输入文字时发生上下抖动的问题 #5139
    • 修复了对 List.Item 的一些插槽属性(例如 prefix extra)是否渲染的判断逻辑,避免当用户传入数字 0 时,出现非预期的显示效果 887db31

v5.11.1

29 Apr 08:16
Compare
Choose a tag to compare
  • 优化
    • 重构了 CascadePicker 的底层实现,优化了性能 50f1f6f
  • 修复
    • 修复了 Swiper 的类型定义缺失的问题 06cda81
    • 修复了 CascadePicker 当不同分组的选项出现相同 value 时,选项会出现覆盖现象的问题 #5132

v5.11.0

28 Apr 07:44
Compare
Choose a tag to compare
  • 特性
    • Form 增加了 useWatch Hook,可以更方便的订阅指定字段的变更 #5074
    • Form 增加了 disabled 属性,可以整体禁用全部表单字段 #5129
    • Button 增加了 loadingIcon 属性 #5106
    • Button 的 loading 属性新增了 'auto' 模式 #5114 #5115
    • Input 和 SearchBar 增加了 onlyShowClearWhenFocus 属性,可以配置清除按钮是否一直显示,同时,SearchBar 的清除按钮调整为了“有内容时一直显示” f1e1eb0
    • Calendar 增加了 minmax 属性 8dbab9a
  • 优化
    • IndexBar.Panel 增加了 children 属性的定义 #5109
    • 水平模式的 Form.Item 中,左侧 label 内容宽度略微调大了一些 4215daa
  • 修复
    • 修复了 Input 处于禁用状态时,在 iOS 下颜色偏浅的问题 e40bc36
    • 修复了 DatePicker 的 closeOnMaskClick 属性未生效的问题 7a26836

v5.10.4

24 Apr 10:40
Compare
Choose a tag to compare
  • 优化
    • Form.Item 当存在 error 时,会附加上一个额外的 CSS class 了 #5101
  • 修复
    • 修复了 Form 的 childElementPosition 在部分浏览器下可能失效的问题 #5102
    • 修复了当 body 或 html 设置了 overflow-x: hidden 时,InfiniteScroll 可能会无限触发 loadMore 函数的问题 fd5b55e