view-design / ViewUI

A high quality UI Toolkit built on Vue.js 2.0
https://www.iviewui.com/
Other
2.65k stars 797 forks source link

[Bug Report]多选的 select 改变下拉选项数据会保留上次选中显示的值 #762

Open haihaigang opened 3 years ago

haihaigang commented 3 years ago

Environment

vue\@2.6.12 view-design\@4.2.0

Reproduction link

https://run.iviewui.com/U3bSSEh3

Steps to reproduce

  1. 设置一个 select 为 multiple,
  2. 选择任意一个选项
  3. 更改 option 对应的数据源,eg: ['a', 'b'] => ['c', 'd']
  4. 然后在点击上次选中同位置的选项
  5. 选择后,select 显示的还是上次旧值,单 value 是改变的

What is expected?

选中的内容不显示旧值

What is actually happening?

选中的显示旧值

riminggit commented 3 years ago

数据变更加个 key 就可以了,key=":data.toString()"放在 option里面