<template>
<div class="ts">
<div :class="{"show": language === "zh"}">zh</div>
<div :class="{"show": language !== "zh"}">en</div>
</div>
</template>
export default {
data() {
return {
language: "zh"
};
},
...
.ts>div{display:none}
.ts>div.show{display:block}
The page always displays en, first and then zh,. I have set the default value for language to zh,. Why is this happening?