1***@qq.com
1***@qq.com
  • 发布:2023-07-18 16:33
  • 更新:2024-09-13 14:20
  • 阅读:800

mui时间选择器在iOS16.4上出现偏移不正常的bug

分类:MUI

这里要清楚是样式导致的问题
可以看看如下链接怎么处理的:https://blog.csdn.net/feeeee889/article/details/131490861

或是以下步骤:
mui.picker.all.js中添加
if (isIos) {
//-----------------添加部分
if (mui.os.ios && mui.os.plus && plus.os.version >= "16.2") {
return;
}
var maches = userAgent.match(/iphone os ([\d_]+) /i);
if (maches && maches.length >= 2 && maches[1] >= "16_2"){
return;
}
//-----------------添加部分
self.list.style.webkitTransformOrigin = "center center " + self.r + "px";

}
mui.picker.css中注释
.mui-picker-inner {
/ 16.4及以上注释 /
/ -webkit-mask-box-image: -webkit-linear-gradient(bottom, transparent, transparent 5%, #fff 20%, #fff 80%, transparent 95%, transparent);
-webkit-mask-box-image: linear-gradient(top, transparent, transparent 5%, #fff 20%, #fff 80%, transparent 95%, transparent) /
}
亲测有效!!!

1 关注 分享
k***@shareinfo.com.cn

要回复文章请先登录注册

k***@shareinfo.com.cn

k***@shareinfo.com.cn

感谢博主,之前想了好多种方法都解决不了苹果的兼容性,看了博主的文章,然后加了2个css就解决了
@supports (font-variant-alternates: styleset(nice-style)) {
.mui-pciker-list {
transform-origin-z: 0 !important;
}
}
.mui-picker-inner {
position: relative;
width: 100%;
height: 100%;
-webkit-mask-box-image: none;
}
2024-09-13 14:20