From 43804edf4582b0867b2538338cb344e0641ef5ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=B6=E5=90=AF=E9=BE=99?= Date: Wed, 4 Sep 2024 18:50:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=84=E7=90=86=20iframe=20=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=85=BC=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/url.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/utils/url.ts b/src/utils/url.ts index 0fcf66e..85f61f0 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -11,8 +11,14 @@ export function appendParamsToUrl(url = '', pathname = '', params: Record -1) { + if (result.endsWith('&')) { + result += searchParams.toString() + } else { + result += '&' + searchParams.toString() + } } else { result += '?' + searchParams.toString() }