feat: migrate Radio/RadioGroup

This commit is contained in:
chenjiahan
2020-08-15 07:20:25 +08:00
parent ab067ecb0c
commit 2172cce8b6
5 changed files with 20 additions and 12 deletions
+4 -2
View File
@@ -8,13 +8,15 @@ export default createComponent({
mixins: [ParentMixin('vanRadio'), FieldMixin],
props: {
value: null,
disabled: Boolean,
direction: String,
modelValue: null,
checkedColor: String,
iconSize: [Number, String],
},
emits: ['change', 'update:modelValue'],
watch: {
value(value) {
this.$emit('change', value);
@@ -24,7 +26,7 @@ export default createComponent({
render() {
return (
<div class={bem([this.direction])} role="radiogroup">
{this.slots()}
{this.$slots.default?.()}
</div>
);
},