Commit 969040e8 authored by 张海景's avatar 张海景

update:修改表格组件的问题

parent 6cf496fb
......@@ -823,12 +823,12 @@ export default {
this.currentRow = {};
},
cellClick(row, index, column) {
this.isDisable = true;
setTimeout(() => {
this.isDisable = false;
console.log(row, index, 'rows');
// this.isDisable = true;
// setTimeout(() => {
// this.isDisable = false;
console.log(row, index, 'rows cellClick');
this.$emit('cellClick', row, index, column);
}, 500);
// }, 500);
},
toggleRowSelection(row) {
// console.log(row, 'rows99')
......@@ -854,6 +854,18 @@ export default {
});
this.$emit('toggleRowSelection', true, this.selectArr);
}
if (this.selectArr.length === this.transData.length) {
this.indeterminate = false;
this.checkedAll = true;
} else {
this.indeterminate = true;
this.checkedAll = false;
}
if (!this.selectArr.length) {
this.checkedAll = false;
this.indeterminate = false;
}
},
handleRadio(event) {
const items = this.data.find((v) => v[this.rowKey] == event.target.value);
......@@ -862,16 +874,16 @@ export default {
this.$emit('toggleRowSelection', true, this.selectArr);
},
rowClick(row, index) {
this.isDisable = true;
setTimeout(() => {
this.isDisable = false;
// this.isDisable = true;
// setTimeout(() => {
// this.isDisable = false;
if (this.highlight) {
this.currentRowIndex = index;
this.currentRow = row;
this.$emit('currentChange', row, index);
}
this.$emit('rowClick', row, index);
}, 500);
// }, 500);
},
checkboxSelectedAll(e) {
this.indeterminate = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment