Element Plus 发布 2.8.0
功能特性
组件更新
[color-picker] alpha-slider a11y (#14245 by @tolking)
添加 mention 组件 (#17586 by @Fuphoenixes)
[tree-v2] 添加 scrollTo 方法 (#14050 by @kaine0923)
[drawer] 添加 append-to 属性 (#17761 by @tolking)
[table] tree children 添加严格检查 (#13519 by @tiandaoyi)
Hooks use-draggable 支持 resetPostion (#17699 by @donga-gao)
[upload] 在默认插槽中添加 index 参数 (#17143 by @zhuchaoling)
[date-picker] 为 DatePicker 添加年份范围类型 (#14804 by @CherishTheYouth)
[date-picker] 添加图标插槽 (#17453 by @zhixiaotong)
问题修复
Build-utils 在排除文件时忽略目录的影响 (#17654 by @tolking)
[select] 超出限制仍然触发更新 (#17685 by @btea)
[slider] 设置滑块精度 (#15328 by @heappynd)
[table] 为 show-overflow-tooltip 覆盖更多边缘情况 (#17629 by @makedopamine)
[table] 修复 table-column 的排序问题 (#17608 by @xixiIBN5100)
[scrollbar] 在 onActivated 钩子中恢复滚动位置 (#11363 by @makedopamine)
[table] 修复 toggleRowSelection 的不准确类型 (#17687 by @makedopamine)
[slider] 当输入值为 undefined 时数据异常 (#15402 by @betavs)
[tabs] 优化 SSR (#15183 by @makedopamine)
[radio] marginRight 设置为 30px,与 checkbox 相同 (#15260 by @taojunnan)
[select-v2] 当点击选择时将焦点正确地移至输入框 (#17362 by @wzc520pyfm)
[tabs] 在 label 插槽中响应式对象可能会失去响应性 (#14135 by @makedopamine)
Theme-chalk [tabs] 当鼠标悬停在边框卡片形状的选项卡上时,内边距不正确 (#17694 by @makedopamine)
[image] 当图片加载错误时无法触发事件 (#17692 by @zhixiaotong)
[abort popper] 修复效果类型错误 (#17758 by @wzc520pyfm)
[date-picker] 修复 monthrange 的用户输入错误 (#12943 by @mdoi2)
[slider] 点击标记时的定位不准确 (#15332 by @heappynd)
[date-picker] 清除按钮重复触发 update:model-value (#17274 by @CherishTheYouth)
组件 SSR 激活错误由 teleport 的 disabled 属性引起 (#17551 by @tolking)
[drawer] 在没有图形加速的情况下修复低动画帧率 (#17696 by @qianjiachun)
国际化
与传统中文相比,添加简体中文 … (#17737 by @WangYJEE)
zh-cn 语言拼写错误 (#17768 by @warmthsea)
其他更新
[tree] 使用 lazy 和 default-expand-all 检查 isLeaf (#17585 by @gaoxuan-haxibiao)
当禁用上传时添加类名和禁用样式 (#17753 by @ma-shuo)
[select] 当 teleported="false" 时下拉框异常关闭 (#17548 by @Aaron-zon)
[select] 相等对象无法销毁实例 (#17214 by @dddssw)
[radio] 修改不触发事件 (#17047 by @VENI-VIDIVICI)
[upload] 当 fileList 不使用 v-model 时删除文件 (#16715 by @Liao-js)
[statistic] 当值为 NAN 时修复过多的小数位数 (#17798 by @dadaguai-git)
修复组件添加监听器后未在 beforeunmount 移除的问题 (#17344 by @myronliu347)
[date-picker] 当类型为 month 时插槽不生效 (#17748 by @btea)
[date-picker] 重新打开后恢复正常 (#11802 by @lyric-zemin)
[dialog] appendTo 类型错误 (#17814 by @zhixiaotong)
重构
Hooks 重写 composition 为可组合函数 (#14240 by @tolking)
[slider] 优化 ts 类型 (#17292 by @tyj-321)
[image-viewer] 优化 translate 计算方法 (#13157 by @zwgwf)
[select] 初始化时取消类型转换 (#17606 by @tolking)
通过事件监听确定焦点 (#17719 by @tolking)
在组件中添加被动监听:
@touchstart
、@touchmove
、@wheel
(#16741 by @warmthsea)使用普通对象替换 ref 对象 (#15061 by @Polaris-tl)