From a254cffade385983a87aa2a24d36cc4767c19ab2 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Tue, 26 Nov 2024 14:15:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=B5=8C=E5=85=A5=E5=BC=8F):=20=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AD=97=E4=BD=93=EF=BC=8C?= =?UTF-8?q?=E5=9C=A8=E6=B7=BB=E5=8A=A0=E4=BA=86=20content-path=20=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8Cdiv=20?= =?UTF-8?q?=E5=B5=8C=E5=85=A5=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F=E4=BC=9A?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E5=AD=97=E4=BD=93=E8=AF=B7=E6=B1=82=E4=B8=8D?= =?UTF-8?q?=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/store/modules/appearance.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/store/modules/appearance.ts b/core/core-frontend/src/store/modules/appearance.ts index c8eebf32e9..6a2ad21b0c 100644 --- a/core/core-frontend/src/store/modules/appearance.ts +++ b/core/core-frontend/src/store/modules/appearance.ts @@ -5,8 +5,10 @@ import { uiLoadApi } from '@/api/login' import { useCache } from '@/hooks/web/useCache' import colorFunctions from 'less/lib/less/functions/color.js' import colorTree from 'less/lib/less/tree/color.js' +import { useEmbedded } from '@/store/modules/embedded' import { setTitle } from '@/utils/utils' +const embeddedStore = useEmbedded() const basePath = import.meta.env.VITE_API_BASEPATH const baseUrl = basePath + '/appearance/image/' import { isBtnShow } from '@/utils/utils' @@ -172,7 +174,9 @@ export const useAppearanceStore = defineStore('appearanceStore', { } fontStyleElement.innerHTML = `@font-face { font-family: '${name}'; - src: url(${basePath}/typeface/download/${currentFont.fileTransName}); + src: url(${ + embeddedStore.baseUrl ? embeddedStore.baseUrl : basePath + }/typeface/download/${currentFont.fileTransName}); font-weight: normal; font-style: normal; }`