el-select选中后,值未更新的问题

 <el-select v-model="forms.district_id" size="mini"  placeholder=""  @change="userDistricts" class="diredge-addres">
  <el-option
      v-for="item in options2"
      :key="item.id"
      :label="item.name"
      :value="item.id">
  </el-option>
</el-select>


 userDistricts (e) {
      this.$forceUpdate()
    },

原因

数据层次太多,render函数没有自动更新,需手动强制刷新(this.$forceUpdate)

方法

  1. 给select添加change事件,强制刷新。具体代码

此随笔或为自己所写、或为转载于网络。仅用于个人收集及备忘。

原文地址:https://www.cnblogs.com/shy1766IT/p/13901945.html