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

AtIcon的size未跟随配置转换为rpx #112

Closed
StingKo opened this issue Oct 11, 2018 · 3 comments
Closed

AtIcon的size未跟随配置转换为rpx #112

StingKo opened this issue Oct 11, 2018 · 3 comments
Assignees

Comments

@StingKo
Copy link

StingKo commented Oct 11, 2018

重现步骤

使用AtIcon组件定义size始终保持单位为px,未转换为rpx,导致在某些设备(如大屏ipad)上icon大小与界面其他组件大小不协调,taro-ui官方演示程序也是如此。

依赖的版本号

Taro v1.3.1

预期结果

AtIcon与其他组件一样size单位随配置转换为rpx

实际结果

AtIcon的size固定为px

@koppthe
Copy link
Collaborator

koppthe commented Oct 13, 2018

这个确实是个问题,感谢反馈~

@wshon
Copy link

wshon commented Dec 14, 2018

同样遇到这个问题,期待解决。

@jimczj jimczj closed this as completed in 047c938 Dec 14, 2018
koppthe added a commit that referenced this issue Dec 24, 2018
- FloatLayout 新增 ScrollView 的属性配置 #258 #259
- InputNumber 新增 onBlur 事件 #251
- ICON 修复 rpx 转换 #112
- 修复 Image Picker 不能选择同一文件的问题
@foreverpw
Copy link

foreverpw commented Jul 24, 2019

@jimczj

-fontSize: `${size}px`,
+fontSize: `${Taro.pxTransform(parseInt(size) * 2)}`,

请问为啥其他组件都是Taro.pxTransform(parseInt(size) ),icon非要*2,不应该统一单位吗,要么都用Px,要么都用rpx/rem。
还有直接拼'px'的,比如progress

const progressStyle = {

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

No branches or pull requests

6 participants