-
Notifications
You must be signed in to change notification settings - Fork 140
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
[comp: Checkbox ] add Checkbox Component #120
Comments
对于Checkbox Group的子checkbox的实现方式我们是按照ant的options属性直接传进去好还是说以插槽形式传入? |
我个人更倾向于使用slots的方式来实现 |
有一个疑惑, |
API 设计过于复杂了,checkbox 应该是一个很简单的组件才对。 几点建议:
|
暂时可以仅支持 slot ,后续可能要支持 options, slot 的优先级高于 options |
CheckoutGroup的value应该是一个泛型,不应局限于使用string |
ant也只支持string,这样使用起来也简单,类型增加多了有啥好处? |
我忽略了input的value只支持string,除了去掉 |
value 的类型应该支持 any |
label呢? |
|
checkbox提供默认插槽来完成文本区域的功能,后续如用户需要增加tip也可以在里面自行增加
|
What problem does this feature solve?
多选框
What does the proposed API look like?
Checkbox
Props
支持原生input属性, 例如
value, name, id
等checked
boolean
false
disabled
boolean
false
indeterminate
boolean
false
trueValue
string | number
true
falseValue
string | number
false
Slots
defalut
Emits
change
Function(checkValue:boolean | string | number)
Checkbox Group
Group Props
| 名称 | 说明 | 类型 | 默认值 | 全局配置 | 备注 |
| --- | --- | --- | --- | --- | --- |value
|
value
| 指定选中的选项 |string[]
|[]
| - | 支持双向绑定,使用时按照v-model:value = 形式 ||
disabled
| 子ix-checkbox
禁用状态 |boolean
|false
| - |- ||
name
| 子ix-checkbox
的 name 属性 |string
| - | - |- |Group Slots
defalut
ix-checkbox
区域Group Emits
change
value
变化时的回调函数Function(checkValue:string[])
The text was updated successfully, but these errors were encountered: