Authored by htoooth

fix

<template>
<Checkbox-group :value="values" @on-change="updateValue" >
<Checkbox-group v-model="values" @on-change="updateValue">
<Checkbox v-for="age in ageList" :key="age.id" :label="age.id" :disabled="disable">
<span>{{age.label}}</span>
</Checkbox>
... ... @@ -34,7 +34,8 @@ export default {
}, {
id: '5',
label: '幼童'
}]
}],
values: this.value.split('|')
};
},
computed: {
... ... @@ -48,6 +49,11 @@ export default {
this.$emit('input', nValue);
}
},
watch: {
value: function(newValue) {
this.values = newValue.split('|');
}
}
};
... ...