el-select使用方法及遇到数据回显的坑

  • Post author:
  • Post category:其他



<


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的值类型保持一致,否则不会正常回显


转载于:https://my.oschina.net/u/3632227/blog/3027212