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')
Source:stackexchange.com