I would like to know how to use propriedade
of a Objeto
in the component concatenate with string and become the name of the class in v-for
My object:
data(){
return{
user: {name:""}
}
}
I would like my class to have the name pencilName
<div v-for="(value, propertyName) in user">
<div class="'pencil'+propertyName[0].toUpperCase() + propertyName.slice(1)" >
<strong>{{propertyName}}</strong>
</div>
</div>
I would like the result to be this:
<div>
<div class="pencilName" >
<strong>Name</strong>
</div>
</div>