Answer the question
In order to leave comments, you need to log in
Why is the v-bind:class error?
Hey!
There is this hash:
fadeSettings: [
{
title: 'Test tltle',
defaultClass: 'b-nav__text',
fadeClass: 'b-nav__text_fade',
isVisible: true,
time: 200
},
{
title: 'Test description',
defaultClass: 'b-nav__cash-term',
fadeClass: 'b-nav__cash-term_fade',
isVisible: true,
time: 300
}
],
infoData() {
return this.fadeSettings;
}
<span
v-for=" infoItem in infoData()"
:key="infoItem.text"
v-bind:class="[ { infoItem.fadeClass: !infoItem.isVisible }, infoItem.defaultClass ]"
>
{{ infoItem.title}}
</span>
Answer the question
In order to leave comments, you need to log in
:class="[ { infoItem.fadeClass: !infoItem.isVisible }, infoItem.defaultClass ]"
[infoItem.fadeClass]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question