Blogger Information
Blog 19
fans 0
comment 1
visits 43865
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
el-select 选中问题
好想睡懒觉的博客
Original
3940 people have browsed it

1、在el-select 加一个change 事件刷新一下就可以了,目前用得还可以 没报什么错

@change=”refreshStatus”

  1. ```html
  2. <el-form-item>
  3. <el-select v-model="form.status" placeholder="请选择" @change="refreshStatus">
  4. <el-option
  5. v-for="item in status_list"
  6. :key="item.value"
  7. :label="item.label"
  8. :value="item.value">
  9. </el-option>
  10. </el-select>
  11. </el-form-item>

```

2、在methods{} 方法加上

//select 后台赋值后无法选中的问题
refreshStatus(){
this.$forceUpdate()
},

ok!

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post