Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template>
- <label class="inline auto-width mb-2">
- <input type="checkbox"
- class="inline auto-width auto-height"
- ref="checkbox"
- :checked="value"
- @input="update"/>
- <slot></slot>
- </label>
- </template>
- <script>
- export default {
- methods: {
- update(){
- this.$emit('input', this.$refs.checkbox.checked)
- }
- },
- props: ['value'],
- };
- </script>
Add Comment
Please, Sign In to add comment