when vue2 + iview + vue-i18n is introduced globally, the internationalization is switched globally, and the select option can be switched normally
.<template>
<div>
<Select v-model="form.select" style="width:200px">
<Option v-for="item in selectList" :label="$t(item.label)" :value="item.value" :key="item.value"></Option>
</Select>
</div>
</template>
<script>
export default {
name: "aaa",
data() {
return {
form: {
select: ""
},
selectList: [
{ label: "user.usd_account", value: "1" },
{ label: "user.khr_account", value: "2" }
]
};
},
}
</script>
,
,
f5,
solution