是
transfer穿梭框
穿梭框右侧的显示顺序应该以穿梭的先后顺序一致,如先加入了条目3、4,然后加入了条目2,结果应该显示为3、4、2。而不是默认的2、3、4、
Translation of this issue:
yes
Transfer shuttle box
The shuttle box on the right side of the display order should be based on the order of the shuttle, such as first joined the item 3 and 4, and then joined the 2 entries, the results should be displayed as 3, 4, 2. Instead of the default 2, 3, 4,
怎么实现呢?谁有方法或者API?
Sorry, we have no plan to support this.
我也遇到这个问题 这就是个bug 失去了穿梭框的意义
I met this problem too,
as official team has no plan to fixed this
I fixed it myself ,
my version is v1.4.2
I edit the source code of the Transfer
Source file of Transfer
`
computed: {
sourceData() {
return this.data.filter(item => this.value.indexOf(item[this.props.key]) === -1);
},
targetData() {
// source code
// return this.data.filter(item => this.value.indexOf(item[this.props.key]) > -1);
// here is my code
let tmp = [];
this.value.forEach(item => {
let i = this.data.findIndex(it => it[this.props.key] === item);
tmp.push(this.data[i]);
});
return tmp;
},
hasButtonTexts() {
return this.buttonTexts.length === 2;
}
}
`
你的方式 选择显示问题是解决了;但是保存完后重新展示不按照之前选择的顺序展示了! 请问你解决了吗?
使用iView的穿梭框组件可解决此问题。
最新版本已经解决此问题