From 04528acb144dcc8f540d9787b56022c745bd0d21 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Fri, 15 Mar 2024 17:27:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=B5=8C=E5=85=A5=E5=BC=8F):=20=E5=B5=8C?= =?UTF-8?q?=E5=85=A5=E5=BC=8F=E4=BA=8C=E7=BA=A7=E8=B7=AF=E5=BE=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/config/base.ts | 2 +- core/core-frontend/src/pages/panel/main.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/config/base.ts b/core/core-frontend/config/base.ts index ddb203e13c..61513f83d1 100644 --- a/core/core-frontend/config/base.ts +++ b/core/core-frontend/config/base.ts @@ -26,6 +26,6 @@ export default { } } }, - sourcemap: true + sourcemap: false } } diff --git a/core/core-frontend/src/pages/panel/main.ts b/core/core-frontend/src/pages/panel/main.ts index 8d1a392fb4..1b34b5747e 100644 --- a/core/core-frontend/src/pages/panel/main.ts +++ b/core/core-frontend/src/pages/panel/main.ts @@ -13,7 +13,8 @@ const formatterUrl = (node: T, prefix: string) => { } if (url.includes(suffix) || url.includes('dataease-private')) { - const currentUrlprefix = new URL(url).origin + const { origin, pathname } = new URL(url) + const currentUrlprefix = `${origin}${pathname.slice(0, pathname.length - 1)}` const newUrl = url.replace(currentUrlprefix, prefix) if (node instanceof HTMLLinkElement) { node.href = newUrl