From c3a4f9aea9ddc5e8edeb7321437a472ac65f5d13 Mon Sep 17 00:00:00 2001 From: lilu Date: Tue, 4 Apr 2023 17:51:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=B0=E8=B4=A6=E5=88=87?= =?UTF-8?q?=E6=8D=A2=EF=BC=8C=E8=8E=B7=E5=8F=96=E5=8E=86=E5=8F=B2=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main/BookingLedger/list/index.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue index bbb2c06..a45d5d8 100644 --- a/src/views/main/BookingLedger/list/index.vue +++ b/src/views/main/BookingLedger/list/index.vue @@ -672,12 +672,14 @@ export default { ...mapGetters(['bookingList', 'bookingGridOptions']) }, beforeRouteLeave (to, from, next) { + const copyArr = JSON.parse(JSON.stringify(this.gridOptions.data)) + const first = copyArr.splice(0, 20) this.setBookingGridOptions(this.gridOptions) this.gridOptions = { border: false, resizable: true, showOverflow: true, - loading: true, + loading: false, stripe: true, round: true, autoResize: true, @@ -691,8 +693,8 @@ export default { pageSize: 10, pageSizes: [10, 20, 50, 100, 200, 500] }, - columns: JSON.parse(JSON.stringify(initData.columns)), - data: [] + columns: this.gridOptions.columns, + data: first } next() }, @@ -737,7 +739,8 @@ export default { this.gridOptions = { ...this.gridOptions, ...newData } setTimeout(() => { this.gridOptions.data = [...this.gridOptions.data, ...more] - }, 60) + console.log(this.gridOptions.data.length) + }, 600) }, 10) }