From 5c6a1cc995d4c3942120d4fe952cf5b5242f579c Mon Sep 17 00:00:00 2001 From: zhangyu <1534695664@qq.com> Date: Fri, 4 Nov 2022 15:15:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E6=9E=B6=E5=9B=BE=E4=B9=A6=EF=BC=8C?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=B1=82=E6=9E=B6=E5=8F=B7=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=8C=E6=9C=80=E5=B0=915=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bookRackList.vue | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/views/bookRackList.vue b/src/views/bookRackList.vue index 16bff94..6849dcf 100644 --- a/src/views/bookRackList.vue +++ b/src/views/bookRackList.vue @@ -126,16 +126,16 @@ export default { } initBookshelfDetails(params).then((res) => { console.log(this.listData) - if (res.shelfs.length === 0) { - res.shelfs.push('firstShelf', 'secondShelf', 'thirdShelf', 'fourthShelf', 'fivethShelf') - for (let index = 0; index < res.shelfs.length; index++) { - const shelfNo = res.shelfs[index] - res.shelfBook[shelfNo] = [] - } - } - this.listData.splice(0, this.listData.length, ...res.shelfs) - for (let index = 0; index < res.shelfs.length; index++) { - const shelfNo = res.shelfs[index] + // if (res.shelfs.length === 0) { + // res.shelfs.push('firstShelf', 'secondShelf', 'thirdShelf', 'fourthShelf', 'fivethShelf') + // for (let index = 0; index < res.shelfs.length; index++) { + // const shelfNo = res.shelfs[index] + // res.shelfBook[shelfNo] = [] + // } + // } + this.listData.splice(0, this.listData.length, ...res.shelfAll) + for (let index = 0; index < res.shelfAll.length; index++) { + const shelfNo = res.shelfAll[index] this.$set(this.bookList, shelfNo, res.shelfBook[shelfNo]) } if (this.listData.length > 0) {