iview Does [Feature Request] RadioGroup and Checkbox Group consider adding props to control the disabled status of the entire group?

bttbmeg0  于 5个月前  发布在  其他
关注(0)|答案(1)|浏览(44)

What problem does this feature solve?

根据其它表单选项来决定整个组件的状态,省去重复代码
<RadioGroup v-model="form.meta.showAlways">
<Radio :label="1" :disabled="form.type === 3 || form.type === 2">展开</Radio>
<Radio :label="0" :disabled="form.type === 3 || form.type === 2">折叠</Radio>
</RadioGroup>

What does the proposed API look like?

希望Group与子选项能同时支持disabled属性
<RadioGroup v-model="form.meta.showAlways" :disabled="form.type === 3 || form.type === 2">
<Radio :label="1">展开</Radio>
<Radio :label="0">折叠</Radio>
</RadioGroup>

mrwjdhj3

mrwjdhj31#

Translation of this issue:
What problem does this feature solve?
Determine the state of the entire component based on other form options, eliminating duplicate code
RadioGroup v-model='form.meta.show Always'> <Radio:label="1": disabled="form.type===3 | form.type===2"> expand </Radio> <Radio:label="0": disabled="form.type====3 | form.type====2"> fold </Radio> </RadioGroup>
What does the proposed API look like?
Hopefully Group and sub-options will support disabled attributes at the same time
RadioGroup V-model = form.meta.showAlways': disabled = form.type=== 3 | | form.type=== 2'> <Radio:label="1">Expansion </Radio> <Radio:label="0">Fold</Radio> </RadioGroup>

相关问题