From 9a1ef85c93647f63567188c25ae3c09ef62f6a7e Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Fri, 29 Oct 2021 19:11:10 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D1=85=D0=BE=D0=B4=20?= =?UTF-8?q?=D0=BD=D0=B0=20Vue=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reader/ContentsPage/ContentsPage.vue | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/client/components/Reader/ContentsPage/ContentsPage.vue b/client/components/Reader/ContentsPage/ContentsPage.vue index 1bca5161..687f1ce4 100644 --- a/client/components/Reader/ContentsPage/ContentsPage.vue +++ b/client/components/Reader/ContentsPage/ContentsPage.vue @@ -122,7 +122,7 @@ const componentOptions = { Window, }, watch: { - bookPos: function() { + bookPos() { this.updateBookPosSelection(); } }, @@ -269,9 +269,9 @@ class ContentsPage { const {id, local} = ims[i]; const bin = this.parsed.binary[id]; if (local) - this.$set(this.imageSrc, id, (bin ? `data:${bin.type};base64,${bin.data}` : '')); + this.imageSrc[id] = (bin ? `data:${bin.type};base64,${bin.data}` : ''); else - this.$set(this.imageSrc, id, id); + this.imageSrc[id] = id; this.imageLoaded[id] = true; await utils.sleep(5); } @@ -295,17 +295,17 @@ class ContentsPage { if (bp >= subitem.offset && bp < nextSubOffset) { subitem.isBookPos = true; - this.$set(this.contents, i, Object.assign(item, {list: item.list})); + this.contents[i] = Object.assign(item, {list: item.list}); } else if (subitem.isBookPos) { subitem.isBookPos = false; - this.$set(this.contents, i, Object.assign(item, {list: item.list})); + this.contents[i] = Object.assign(item, {list: item.list}); } } if (bp >= item.offset && bp < nextOffset) { - this.$set(this.contents, i, Object.assign(item, {isBookPos: true})); + this.contents[i] = Object.assign(item, {isBookPos: true}); } else if (item.isBookPos) { - this.$set(this.contents, i, Object.assign(item, {isBookPos: false})); + this.contents[i] = Object.assign(item, {isBookPos: false}); } } @@ -314,9 +314,9 @@ class ContentsPage { const nextOffset = (i < this.images.length - 1 ? this.images[i + 1].offset : this.parsed.textLength); if (bp >= img.offset && bp < nextOffset) { - this.$set(this.images, i, Object.assign(img, {isBookPos: true})); + this.images[i] = Object.assign(img, {isBookPos: true}); } else if (img.isBookPos) { - this.$set(this.images, i, Object.assign(img, {isBookPos: false})); + this.images[i] = Object.assign(img, {isBookPos: false}); } } } @@ -331,7 +331,7 @@ class ContentsPage { await utils.sleep(200); } - this.$set(this.contents, key, Object.assign({}, item, {expanded})); + this.contents[key] = Object.assign({}, item, {expanded}); if (expanded) { await this.$nextTick();