From a29dac014632dfa6b70da51977e42723bbe5ecab Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 15 Mar 2026 21:04:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E8=96=84=E6=9C=80=E5=A4=A7=E5=80=BC=E9=80=BB=E8=BE=91=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/OrderBook.vue | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/components/OrderBook.vue b/src/components/OrderBook.vue index 240a528..e76543e 100644 --- a/src/components/OrderBook.vue +++ b/src/components/OrderBook.vue @@ -37,7 +37,7 @@
{ // Reverse to display in descending order }) -// Calculate max total from cumulative totals -const maxAsksTotal = computed(() => { +// Shared max total from both asks and bids cumulative totals (for progress bar scale) +const maxOrderBookTotal = computed(() => { const askTotals = asksWithCumulativeTotal.value.map((item) => item.cumulativeTotal) - const allTotals = [...askTotals] - return Math.max(...allTotals) -}) - -const maxBidsTotal = computed(() => { const bidTotals = bidsWithCumulativeTotal.value.map((item) => item.cumulativeTotal) - const allTotals = [...bidTotals] - return Math.max(...allTotals) + const allTotals = [...askTotals, ...bidTotals] + return allTotals.length ? Math.max(...allTotals) : 0 })