<div class="container" :class="{ qwerty: !open }" :class="lower? 'left' : 'right'">
Hi, why vue doesn't allow me to add several classes with conditions, like in example.
It allows to add one only.
How to implement this?
If you have multiple conditions that goes too lengthy including too many logics then go with computed
<div class="container" :class="getClass">
then
computed: {
getClass() {
var className = 'container';
if(!this.open) className = className+' '+'querty';
if(this.lower) className = className+' '+'left';
else className = className+' '+'right';
return className;
}
}