<amber-checkbox @change="onChange">Checkbox</amber-checkbox> <script> export default { methods: { onChange(e) { console.log(e) } } } </script>
<amber-checkbox disabled @change="onChange">Checkbox</amber-checkbox> <amber-checkbox disabled v-model="checked" @change="onChange">Checkbox</amber-checkbox> <script> export default { data() { return { checked: true, } }, mounted(){ setTimeout(()=>{ this.checked = false },2000) }, methods: { onChange(e) { console.log(e) } } } </script>
<amber-checkbox-group v-model="checkList"> <amber-checkbox label="a"></amber-checkbox> <amber-checkbox label="b"></amber-checkbox> <amber-checkbox label="c"></amber-checkbox> <amber-checkbox label="禁用" disabled></amber-checkbox> <amber-checkbox label="选中且禁用" disabled></amber-checkbox> </amber-checkbox-group> <script> export default { data() { return { checkList: ['a','选中且禁用'], } }, } </script>
← Radio Select →