ant-design / ant-design-mobile

Essential UI blocks for building mobile web apps.
https://mobile.ant.design
MIT License
11.62k stars 2.39k forks source link

高清方案Picker表现异常 #4748

Closed mushan0x0 closed 2 years ago

mushan0x0 commented 2 years ago

Version of antd-mobile

5.0.0-rc.22

Operating system and its version

No response

Browser and its version

No response

Sandbox to reproduce

No response

What happened?

https://user-images.githubusercontent.com/29084441/151472206-0fe27d6b-e51a-4f70-8c49-91a0632dd163.mp4

有人提过这个,https://github.com/ant-design/ant-design-mobile/issues/4149 这个不修复的话高清方案没法用了

Relevant log output

No response

awmleer commented 2 years ago

麻烦提供一下你项目的具体信息?你所谓的高清方案,具体是什么样的配置?在蚂蚁内部有很多很多项目都使用了高清方案,但是目前 Picker 组件都是可以正常工作的。所以无法确定是你自己项目的问题还是 antd-mobile 的问题

另外,关于如何提交 issue 的指引,请查阅这里

mushan0x0 commented 2 years ago

image 用的babel-plugin-import插件做的高清方案搭配的postcss-px-to-viewport image

mushan0x0 commented 2 years ago

目前临时的方案是手动放大adm-px-tester

.adm-px-tester {
  transform: scale(2);
}
awmleer commented 2 years ago

引入 antd-mobile/es/global 了么?控制台有没有 error 或者 warning 提示?

image

https://mobile.ant.design/zh/guide/import-on-demand

mushan0x0 commented 2 years ago

image 引入了的

awmleer commented 2 years ago

对于你这种配置方式,应该引入 antd-mobile/2x/es/global 而不是 antd-mobile/es/global,可以试一下看看

mushan0x0 commented 2 years ago

对于你这种配置方式,应该引入 antd-mobile/2x/es/global 而不是 antd-mobile/es/global,可以试一下看看

还是一样的会有问题,只不过偏移得更大了

awmleer commented 2 years ago

顺便,现在已经不推荐使用 FastClick 了哈:

image

FastClick 自己的仓库首页上都注明了不推荐大家使用,除非真的有必要:https://github.com/ftlabs/fastclick

awmleer commented 2 years ago

对于你这种配置方式,应该引入 antd-mobile/2x/es/global 而不是 antd-mobile/es/global,可以试一下看看

还是一样的会有问题,只不过偏移得更大了

那给个最小复现的项目压缩包吧,不然我们在这里就是猜谜

mushan0x0 commented 2 years ago

对于你这种配置方式,应该引入 antd-mobile/2x/es/global 而不是 antd-mobile/es/global,可以试一下看看

还是一样的会有问题,只不过偏移得更大了

那给个最小复现的项目压缩包吧,不然我们在这里就是猜谜

解决了似乎是改成antd-mobile/2x/es/global就行了

mushan0x0 commented 2 years ago

顺便,现在已经不推荐使用 FastClick 了哈:

image

FastClick 自己的仓库首页上都注明了不推荐大家使用,除非真的有必要:https://github.com/ftlabs/fastclick

还是有必要,在remax的web端上用了响应变快了

awmleer commented 2 years ago

好,那 issue 我关闭了