vant/src/radio-group/index.js

30 lines
542 B
JavaScript

import { createNamespace } from '../utils';
import { ParentMixin } from '../mixins/relation';
const [createComponent, bem] = createNamespace('radio-group');
export default createComponent({
mixins: [ParentMixin('vanRadio')],
props: {
value: null,
disabled: Boolean,
checkedColor: String,
iconSize: [Number, String]
},
watch: {
value(value) {
this.$emit('change', value);
}
},
render() {
return (
<div class={bem()} role="radiogroup">
{this.slots()}
</div>
);
}
});