[Vuejs]-Vue-JS: use variable in v-for as label in q-btn?

1👍

If your list is just numbers, you could iterate through number directly inside the v-for then bind that number to label prop :

<q-btn v-for="number in 9" v-bind:key="number" color="primary" :label="number" />

Note that :label="number" is a shorthand of v-bind:label="number"

Leave a comment