You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425
  1. <template>
  2. <div class="row p-2" @click="checkItem">
  3. <div class="custom-control custom-checkbox">
  4. <input type="checkbox" class="custom-control-input" :checked="checked" />
  5. <label class="custom-control-label">{{title}}</label>
  6. </div>
  7. </div>
  8. </template>
  9. <script>
  10. export default {
  11. props: ['title'],
  12. data() {
  13. return {
  14. checked: true,
  15. };
  16. },
  17. methods: {
  18. checkItem() {
  19. this.checked = !this.checked;
  20. this.$emit('checkItem', this.title, this.checked);
  21. },
  22. },
  23. };
  24. </script>