Closed javaswing closed 6 years ago
Translation of this issue:
1.4.13
All Brower
2.1.10
https://jsfiddle.net/javaSwing/12v7bhhu/
Https://jsfiddle.net/javaSwing/12v7bhhu/
After the array changes the order, it tries to make a corresponding change
No matter how the order of the data is changed, sort, reverse, the view has not changed
https://jsfiddle.net/leopoldthecuber/12v7bhhu/2/ key 给错了。对于每一列,在 reverse 前后的 item.id
是一样的,不会触发渲染。
@Leopoldthecoder 如果给的是index我对应列的formatter方法会,在原来列的位置起作用,比如我第3列是格式化money显示的,把他换到第8列,新的第3列会调用原来的formatter 请麻烦看下,我问了很多人也没有办法: https://jsfiddle.net/javaSwing/qyks3qfm/2/#
这样的话 key 需要满足两个条件:
@Leopoldthecoder 非常感谢大佬的回答!
Element UI version
1.4.13
OS/Browsers version
all brower
Vue version
2.1.10
Reproduction Link
https://jsfiddle.net/javaSwing/12v7bhhu/
Steps to reproduce
https://jsfiddle.net/javaSwing/12v7bhhu/
What is Expected?
数组改变顺序后,试图能进行对应的改变
What is actually happening?
无论怎么改变数据的顺序,sort,reverse之后,视图都没有改变