From 650451c123d8b78d2e3bfd5a1d665e133831ffc8 Mon Sep 17 00:00:00 2001 From: liumangmang Date: Wed, 1 Jul 2026 17:14:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BC=95=E5=85=A5=20normalizeRateBound?= =?UTF-8?q?=20=E6=A0=87=E5=87=86=E5=8C=96=E5=80=8D=E7=8E=87=E7=A9=BA?= =?UTF-8?q?=E8=BE=93=E5=85=A5=EF=BC=8C=E8=A7=A3=E5=86=B3=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=B8=85=E7=A9=BA=E5=90=8E=E8=BF=87=E6=BB=A4=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/Websites.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/Websites.vue b/frontend/src/views/Websites.vue index d2ba650..dffaa16 100644 --- a/frontend/src/views/Websites.vue +++ b/frontend/src/views/Websites.vue @@ -1296,6 +1296,12 @@ const upstreamCounts = computed(() => { return counts }) +function normalizeRateBound(value: unknown): number | null { + if (value === null || value === undefined || value === '') return null + const parsed = Number(value) + return Number.isFinite(parsed) ? parsed : null +} + const filteredGroupsForModal = computed(() => { const query = groupSearchQuery.value.trim().toLowerCase() return upstreamGroupOptions.value.filter(item => { @@ -1314,8 +1320,8 @@ const filteredGroupsForModal = computed(() => { } // 3. 倍率范围过滤 - const min = groupRateMin.value - const max = groupRateMax.value + const min = normalizeRateBound(groupRateMin.value) + const max = normalizeRateBound(groupRateMax.value) if (min !== null || max !== null) { const rateVal = parseFloat(String(item.rate)) if (isNaN(rateVal)) {