日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學無先后,達者為師

網站首頁 編程語言 正文

elementui組件select選擇不中的問題(組件select選擇器無法顯示選中的內容)

作者:半夏ing 更新時間: 2022-04-04 編程語言

時間過得真快,我又開始上班了,fighting!
遇到的第一個問題,就如題目所說,直接給答案哈,在select元素上面添加change事件,然后在事件里面強制刷新
代碼如下,僅供參考

  <el-select v-model="value" placeholder="請選擇"  @change="updateCode">
    <el-option
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :value="item.value">
    </el-option>
  </el-select>

updateCode(val){
	this.$forceUpdate();//強制更新
}

over

原文鏈接:https://blog.csdn.net/Fiona_lms/article/details/112599005

欄目分類
最近更新