elementUI 组件select 一个页面多次使用的情况

elementUI 组件select 一个页面多次使用的情况


elementUI 组件select 一个页面多次使用的情况

通过ajax得到数据在option中显示elementUI 组件select 一个页面多次使用的情况

elementUI 组件select 一个页面多次使用的情况

elementUI 组件select 一个页面多次使用的情况



当一个页面有多个select时

1.在data中定义

elementUI 组件select 一个页面多次使用的情况

elementUI 组件select 一个页面多次使用的情况


此时选择option中的内容就可以在页面的input框中显示,

elementUI 组件select 一个页面多次使用的情况

但是如果我要在页面显示name

但需要传给后台这个name的对应的id 

则需要用v-model来操作

在vue里面用this.selectFloor.floorId就可以得到此时选中option的id

elementUI 组件select 一个页面多次使用的情况


elementUI 组件select 一个页面多次使用的情况

最后的结果

elementUI 组件select 一个页面多次使用的情况

elementUI 组件select 一个页面多次使用的情况

相关文章:

  • 2022-12-23
  • 2021-12-30
  • 2022-12-23
  • 2022-01-11
  • 2022-02-14
  • 2021-04-25
  • 2021-08-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
  • 2021-08-03
  • 2022-12-23
  • 2021-12-10
相关资源
相似解决方案