D
D
Dutymy2021-09-20 14:39:38
Vue.js
Dutymy, 2021-09-20 14:39:38

Use string in v-bind:class?

Hello, can I use C no problem, but the name of the button I have depends on the variable... v-bind:class="{'button__' + buttonName}"
v-bind:class="{button__accept}"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim, 2021-09-20
@Dutymy

Can
:class="`button_${buttonName}`"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question