diff --git a/src/components/JExpandTable.vue b/src/components/JExpandTable.vue index efb591b..339dad7 100644 --- a/src/components/JExpandTable.vue +++ b/src/components/JExpandTable.vue @@ -282,6 +282,9 @@ export default { }, deep: true, immediate: true + }, + expandedRowKeys (val) { + console.log('expandedRowKeys改变了', val) } }, data () { @@ -359,7 +362,8 @@ export default { const firstPage = parseInt((Number(firstIndex) + 1) / this.ipagination.pageSize) + 1 this.ipagination.current = firstPage this.$nextTick(() => { - this.expandedRowKeys = [...this.expandedRowKeys, ...errorRows.map(tt => tt.rowKey)] + const arr = [...this.expandedRowKeys, ...errorRows.map(tt => tt.rowKey)] + this.expandedRowKeys = Array.from(new Set(arr)) let timer = setTimeout(() => { this.$nextTick(() => { errorIndex.forEach(index => {