|
@@ -47,10 +47,10 @@ export default {
|
|
|
width: 45,
|
|
width: 45,
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
selectable: (row, index) => {
|
|
selectable: (row, index) => {
|
|
|
- if (this.selectList.length) {
|
|
|
|
|
|
|
+ if (Array.isArray(this.selectList)) {
|
|
|
return !this.selectList.some((it) => row.id == it.id);
|
|
return !this.selectList.some((it) => row.id == it.id);
|
|
|
} else {
|
|
} else {
|
|
|
- return;
|
|
|
|
|
|
|
+ return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
},
|
|
},
|
|
@@ -179,7 +179,7 @@ export default {
|
|
|
this.$refs.table.reload({ pageNum: 1, where: where });
|
|
this.$refs.table.reload({ pageNum: 1, where: where });
|
|
|
},
|
|
},
|
|
|
open(list) {
|
|
open(list) {
|
|
|
- if (list.length) {
|
|
|
|
|
|
|
+ if (Array.isArray(list)) {
|
|
|
this.selectList = list;
|
|
this.selectList = list;
|
|
|
} else {
|
|
} else {
|
|
|
this.type = list;
|
|
this.type = list;
|
|
@@ -223,7 +223,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
console.log(this.selection, '我是选择数据');
|
|
console.log(this.selection, '我是选择数据');
|
|
|
|
|
|
|
|
- if (this.selection.length > 0) {
|
|
|
|
|
|
|
+ if (Array.isArray(this.selection) && !this.type) {
|
|
|
this.$emit('selection', this.selection);
|
|
this.$emit('selection', this.selection);
|
|
|
} else {
|
|
} else {
|
|
|
this.$emit('selection', this.type, this.selection);
|
|
this.$emit('selection', this.type, this.selection);
|