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

关于switch组件 #23

Closed
fanzouguo opened this issue Sep 14, 2018 · 1 comment
Closed

关于switch组件 #23

fanzouguo opened this issue Sep 14, 2018 · 1 comment
Labels

Comments

@fanzouguo
Copy link

场景1:后台返回值为 0、1,每次获取后,都要人为去转换一下,稍微忘记都不行。是否可以从组件级自动判断 -1、0、1,这样的值;

场景2:比如:想用字段 nullAble 代表是否可为空,DB值为 0:不可为空,1:允许为空。但在前端页面控件的LABLE名称为”是否必填“,因此当值为 0时,反而需要组件显示为 “打开”状态。

在这个特性上,比较赞同 iview的处理方法,有两个 api:true-value 和 false-value,这样可以个性控制,满足任意场景。

@vvpvvp vvpvvp added the feat label Sep 18, 2018
@vvpvvp
Copy link
Member

vvpvvp commented Sep 18, 2018

之前我们也遇到这个问题,我觉得这个建议非常好,我明天参考iview优化一波。

@vvpvvp vvpvvp closed this as completed in 7010516 Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants