mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-25 07:49:15 +08:00
28 lines
502 B
JavaScript
28 lines
502 B
JavaScript
import { createNamespace } from '../utils';
|
|
import { ParentMixin } from '../mixins/relation';
|
|
|
|
const [createComponent, bem] = createNamespace('checkbox-group');
|
|
|
|
export default createComponent({
|
|
mixins: [ParentMixin('vanCheckbox')],
|
|
|
|
props: {
|
|
max: Number,
|
|
disabled: Boolean,
|
|
value: {
|
|
type: Array,
|
|
default: () => []
|
|
}
|
|
},
|
|
|
|
watch: {
|
|
value(val) {
|
|
this.$emit('change', val);
|
|
}
|
|
},
|
|
|
|
render(h) {
|
|
return <div class={bem()}>{this.slots()}</div>;
|
|
}
|
|
});
|