[Vuejs]-Q-btn click event not working on q-checkbox

0👍

Please refer this code.

<q-btn color="white" text-color="black" label="Standard"  @click.stop="tog()">
      
       <q-checkbox
        class="q-mr-sm"
        v-model="item.toggle"
      />

      <div class="text-caption text-grey" style="">{{ item.label }}</div>
      <q-space />
    </q-btn>

const { ref } = Vue

const app = Vue.createApp({
  setup () {
    return {
      item: ref({toggle: false, label: 'aaa'})
    }
  },
  methods:{
    tog(){
      this.item.toggle = !this.item.toggle
    }
  }
})

app.use(Quasar, { config: {} })
app.mount('#q-app')

Codepen – https://codepen.io/Pratik__007/pen/zYjEENr

Leave a comment