Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] 按钮中的数字样式问题 #2881

Closed
chenjianzhonglol opened this issue Mar 19, 2020 · 5 comments · Fixed by #2883
Closed

[Bug Report] 按钮中的数字样式问题 #2881

chenjianzhonglol opened this issue Mar 19, 2020 · 5 comments · Fixed by #2883
Labels
Milestone

Comments

@chenjianzhonglol
Copy link

设备

iphone7

VantWeapp 版本

1.0.6

基础库版本

2.6.6

如果是 UI 问题,截图链接(多图回车分隔)

截图

截图

请提供核心代码片段链接

https://gist.github.com/richchen/6b2074c8f3d1ceda6bc2d9b1b35406d3

描述问题

前两天提过这个问题,你们那边说没问题,但是你们给的结果是在安卓手机上测试的结果啊,我这个问题只在ios上有问题好像?

我已经找到原因,答案在第二张截图中,这应该是微信小程序的一个小bug,只要显示的指定button的lang属性,lang属性的值不等于zh_CN或zh_TW,那button中的数字样式在ios中都是有问题的。

因为van-button封装都是显示指定的lang值而且默认值是en,所以只要开发者没有指定van-button的lang值为zh_CN或zh_TW,那如果在van-button中使用数字,都是会有问题的。

@rex-zsd
Copy link
Collaborator

rex-zsd commented Mar 19, 2020

那应该是小程序的bug了,因为小程序的文档里lang的默认值就是'en',所以van-button默认设置了'en'。
但是iOS上实际并不是,导致了这个问题吧。
https://developers.weixin.qq.com/miniprogram/dev/component/button.html

@rex-zsd
Copy link
Collaborator

rex-zsd commented Mar 19, 2020

WechatIMG3
试了一下iPhone XS Max,也是没问题的,应该是小程序在部分机型上的bug

@rex-zsd
Copy link
Collaborator

rex-zsd commented Mar 19, 2020

vant weapp这边可以去除lang的默认值,兼容小程序的bug。

@rex-zsd rex-zsd added this to the 1.1.0 milestone Mar 19, 2020
rex-zsd added a commit to rex-zsd/vant-weapp that referenced this issue Mar 19, 2020
@chenjianzhonglol
Copy link
Author

chenjianzhonglol commented Mar 19, 2020 via email

rex-zsd added a commit that referenced this issue Mar 19, 2020
@chenjianzhonglol
Copy link
Author

chenjianzhonglol commented Mar 19, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants