mirror of https://github.com/ElemeFE/element
Table: multiple selection mode failure
parent
6eaa9ef545
commit
7bdda0b994
|
@ -370,7 +370,11 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
data(val) {
|
data(val) {
|
||||||
this.tableData = val;
|
if (val && this.selectionMode === 'multiple') {
|
||||||
|
this.tableData = val.map(item => objectAssign({ '$selected': false }, item));
|
||||||
|
} else {
|
||||||
|
this.tableData = val;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
tableData(newVal) {
|
tableData(newVal) {
|
||||||
|
@ -398,10 +402,6 @@
|
||||||
|
|
||||||
this.styleNode = styleNode;
|
this.styleNode = styleNode;
|
||||||
|
|
||||||
if (this.tableData && this.selectionMode === 'multiple') {
|
|
||||||
this.tableData = this.tableData.map(item => objectAssign({ '$selected': false }, item));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.doRender();
|
this.doRender();
|
||||||
|
|
||||||
this.$ready = true;
|
this.$ready = true;
|
||||||
|
|
Loading…
Reference in New Issue