el-select使用方法及遇到數據回顯的坑

< el-select v-model = " temp . lang " class = "filter-item" placeholder = "Please select" >
< el-option v-for = " item in langs " :key = " item . value " :label = " item . label " :value = " item . value " />
</ el-select >
 
langs: [{
value: '1' ,//這裏注意值爲字符型,須要與 temp . lang的值類型保持一致,不然不會正常回顯
label: '中文'
},
{
value: '0' ,
label: '英文'
}
],
這裏 注意值value爲字符型,須要與 temp . lang的值類型保持一致,不然不會正常回顯
相關文章
相關標籤/搜索