update model and props properties

This commit is contained in:
taehoon 2019-04-06 13:24:28 -04:00
parent 8088043a0c
commit 988849116d

View file

@ -1,6 +1,6 @@
<template> <template>
<label class="checkbox"> <label class="checkbox">
<input type="checkbox" :checked="value" @change="$emit('input', $event.target.checked)"> <input type="checkbox" :checked="checked" @change="$emit('change', $event.target.checked)">
<i class="checkbox-indicator" /> <i class="checkbox-indicator" />
<span><slot></slot></span> <span><slot></slot></span>
</label> </label>
@ -8,7 +8,11 @@
<script> <script>
export default { export default {
props: ['value'] model: {
prop: 'checked',
event: 'change'
},
props: ['checked']
} }
</script> </script>