Hi!
Have this HTML+VUE
<template>
<div
v-if="
floatcolorgreen ===
1
"
class="fullCirclegreen"
>
Grønn
</div>
<div
v-if="
floatcolororange ===
1
"
class="fullCircleorange"
>
Orange
</div>
<div
v-if="
floatcolorred ===
1
"
class="fullCirclered"
>
Rød
</div>
</template>
In javascript fullCirclegreen , floatcolororange and floatcolorred get values of
0 or 1.
This variables i get from axios,,,,,
object.floatcolororange = localStorage.getItem(
"playerInfo_floatcolororange"
);
Styling:
.fullCirclegreen {
width: 30px;
height: 30px;
border: 1px solid;
border-radius: 50%;
background-color: greenyellow;
}
.fullCircleorange {
width: 30px;
height: 30px;
border: 1px solid;
border-radius: 50%;
background-color: rgb(231, 159, 6);
}
.fullCirclered {
width: 30px;
height: 30px;
border: 1px solid;
border-radius: 50%;
background-color: rgb(236, 99, 14);
}
So my question, why dosent v-if works (it dosent show me any of the 3 circles ??