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

Picker选择器定位不准? #21

Closed
polyrabbit opened this issue Dec 18, 2016 · 19 comments
Closed

Picker选择器定位不准? #21

polyrabbit opened this issue Dec 18, 2016 · 19 comments

Comments

@polyrabbit
Copy link

image

如上图,我经常发现picker滚动之后不再停留在某一项上,而是停在两项之间,这让使用者很困惑,请问这大概是什么原因造成的?

@sklme
Copy link
Collaborator

sklme commented Dec 19, 2016

可能是修改了微信浏览器字体造成的,能否提供一下demo的地址,定位一下问题?

@polyrabbit
Copy link
Author

可以通过关注公众号WeCron,设置一个提醒,然后打开这个提醒的网页版,就可以重现该问题,还是需要我重新搭一套环境来重现?

@liniu
Copy link

liniu commented Dec 19, 2016

我也碰到这个问题,结果跟选中的时间不是同一个值

@sklme
Copy link
Collaborator

sklme commented Dec 19, 2016

你的CSS污染了picker,改变本身的字体大小。
你检查调试一下看看是什么哪里的样式影响了。

我们这边后续也增加一下,屏蔽一下外界的样式污染。
@polyrabbit

@liniu
Copy link

liniu commented Dec 19, 2016

没错,确实是改变字体大小引起的,后续完善吧

@polyrabbit
Copy link
Author

OK,谢谢,期待后续的完善。

@liaoliaokl
Copy link

liaoliaokl commented Dec 22, 2016

datapicker 可以设置打开的时候默认选中的是当天的信息吗,有没有具体的文档

@BearJ
Copy link
Collaborator

BearJ commented Dec 22, 2016

@LazyHua
Copy link

LazyHua commented Dec 30, 2016

@polyrabbit 你的问题我昨天遇到了,是因为添加了mui.css的原因,你可以试试把mui.css去掉应该就可以了

@LazyHua
Copy link

LazyHua commented Dec 30, 2016

@BearJ 我昨天试了下你发的网址上picker的默认值设置,可是发布出去会出现,在微信端跟uc没有时间选择的情况,后来改了下东西就可以了,但是设置打开的时候默认选中的是当天的信息这个又不起作用了,这是为什么呀

@polyrabbit
Copy link
Author

@LazyHua 谢谢,但我并没有用mui.css,用的是ionic,估计里面哪一项把font-size给改了,我也不知道应该改成什么。

@BearJ
Copy link
Collaborator

BearJ commented Jan 4, 2017

@LazyHua 参数里有个id的项,建议你传入不同的id,因为同一个id会被缓存

@BearJ
Copy link
Collaborator

BearJ commented Jan 19, 2017

这里定位不准的问题需要从weui.css层面修复

@LazyHua
Copy link

LazyHua commented Jan 19, 2017

恩好的,谢谢

@BearJ
Copy link
Collaborator

BearJ commented Jan 20, 2017

@polyrabbit 目前可以这样修复,在自己的样式里加入这段代码:

.weui-picker__item{
    padding: 0;
    height: 34px;
    line-height: 34px;
}

@baiyapeng
Copy link

baiyapeng commented Mar 2, 2017

@polyrabbit @liniu 不知道你们问题解决了没有,其实 toast 也会有大小失常的问题,我在项目中添加以下样式代码,已经完美解决,可以参考下
.weui-picker { font-size: 16px !important; }

.weui-toast { font-size: small !important; }

@BearJ
Copy link
Collaborator

BearJ commented Mar 3, 2017

@baiyapeng 好的,谢谢提醒,我们去看看~

@xiaosongxiaosong
Copy link
Contributor

最开始以为是ionic和weui冲突,最后静下心定位出来过来看发现果然有这个issue

@YuWenZhong
Copy link

我同样碰到这个问题,改用1.1.2版本css就好使了。

@BearJ BearJ closed this as completed Jan 25, 2018
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

9 participants