From 3c9496de404d4eff6275153bf728aa9f23027f04 Mon Sep 17 00:00:00 2001 From: William Chong Date: Mon, 17 Feb 2025 18:23:29 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20isAllowCustomPrice=20optio?= =?UTF-8?q?n=20value=20for=20free=20books?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collection/status/[collectionId]/edit.vue | 8 +++++--- .../status/[classId]/edit/[editionIndex].vue | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pages/nft-book-store/collection/status/[collectionId]/edit.vue b/pages/nft-book-store/collection/status/[collectionId]/edit.vue index a9a79de23..f7b480959 100644 --- a/pages/nft-book-store/collection/status/[collectionId]/edit.vue +++ b/pages/nft-book-store/collection/status/[collectionId]/edit.vue @@ -64,7 +64,7 @@ - + @@ -309,11 +309,13 @@ config({ } }) -watch(price, (newPrice, oldPrice) => { +function onPriceInput (input: any) { + const newPrice = input.target.value + const oldPrice = price.value if (Number(oldPrice) !== 0 && Number(newPrice) === 0) { isAllowCustomPrice.value = true } -}) +} onMounted(async () => { try { diff --git a/pages/nft-book-store/status/[classId]/edit/[editionIndex].vue b/pages/nft-book-store/status/[classId]/edit/[editionIndex].vue index 56e41c8e8..6db191399 100644 --- a/pages/nft-book-store/status/[classId]/edit/[editionIndex].vue +++ b/pages/nft-book-store/status/[classId]/edit/[editionIndex].vue @@ -63,7 +63,7 @@ - + @@ -321,11 +321,13 @@ config({ } }) -watch(price, (newPrice, oldPrice) => { +function onPriceInput (input: any) { + const newPrice = input.target.value + const oldPrice = price.value if (Number(oldPrice) !== 0 && Number(newPrice) === 0) { isAllowCustomPrice.value = true } -}) +} watch(isAutoDeliver, (newValue) => { if (newValue) {