-
Notifications
You must be signed in to change notification settings - Fork 492
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组件的一些建议 #218
Labels
Comments
谢谢建议和pr #219 |
根据api写的,内容选择有误,选不了第一二项 |
Open
ruoru
pushed a commit
to ruoru/react-weui
that referenced
this issue
Jan 16, 2018
@TaoMeiLi 这个库已经6个月没有更新了,估计weui出一个新的库或者转移到其他框架上,最近我会把picker里面的代码改一改,提交上去看能不能合并,选不了一二项是什么问题?有原码或者能具体描述一下,因为源码里面这个问题我还是没有看到。 |
ruoru
pushed a commit
to ruoru/react-weui
that referenced
this issue
Jan 27, 2018
ruoru
pushed a commit
to ruoru/react-weui
that referenced
this issue
Feb 5, 2018
ruoru
pushed a commit
to ruoru/react-weui
that referenced
this issue
Feb 5, 2018
ruoru
pushed a commit
to ruoru/react-weui
that referenced
this issue
Feb 5, 2018
ruoru
pushed a commit
to ruoru/react-weui
that referenced
this issue
Feb 5, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pr #219
picker_group
这里的代码不需要判断,一行就可以。
picker_group
这里代码不需要把数组循环完毕
city_picker是不需要考虑props改变的场景,定位很明确。但是picker作为一个覆盖面广的组件需要考虑到props改变的场景,这个场景需求很大。
应当设置value和text,有些情况下,显示值与实际需要获取的值不一样,所以考虑组件广泛性应当在data结构中设置value和text,这样设计比较合理。
picker作为组件设计应当将picker独立考虑,我认为city_picker这里是组件外部text的选中值,组件里面应当有组件当前选中值,text既做外部传入值,组件应当初始化显示为text选中值,但是明显没有实现。
组件没有初始化选中值,用户不滑动情况下直接选中这种场景是存在的。
-----吃完饭继续写-----
city_picker
这里可以用循环去写更容易读懂
接口写的不明确,有些属性接口中没有的,程序中直接用了。citypicker里面的lang属性是很需要的,但是没有。建议检查下接口与程序内部props属性一致问题。
group本来就是组的意思,强行加groups很不容易区分多组不级联选择器的区别,建议picker_group更名为picker_list,用list单指一列
The text was updated successfully, but these errors were encountered: