mirror of
https://github.com/dataease/dataease.git
synced 2026-05-20 11:38:11 +08:00
fix(嵌入式): 上传自定义字体,在添加了 content-path 路径的情况下,div 嵌入数据大屏会提示字体请求不到
This commit is contained in:
@@ -175,7 +175,9 @@ export const useAppearanceStore = defineStore('appearanceStore', {
|
||||
fontStyleElement.innerHTML = `@font-face {
|
||||
font-family: '${name}';
|
||||
src: url(${
|
||||
embeddedStore.baseUrl ? embeddedStore.baseUrl : basePath
|
||||
embeddedStore.baseUrl
|
||||
? (embeddedStore.baseUrl + basePath).replace('/./', '/')
|
||||
: basePath
|
||||
}/typeface/download/${currentFont.fileTransName});
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
@@ -212,9 +214,11 @@ export const useAppearanceStore = defineStore('appearanceStore', {
|
||||
defaultFont().then(res => {
|
||||
const [font] = res || []
|
||||
setDefaultFont(
|
||||
`${embeddedStore.baseUrl ? embeddedStore.baseUrl : basePath}/typeface/download/${
|
||||
font?.fileTransName
|
||||
}`,
|
||||
`${
|
||||
embeddedStore.baseUrl
|
||||
? (embeddedStore.baseUrl + basePath).replace('/./', '/')
|
||||
: basePath
|
||||
}/typeface/download/${font?.fileTransName}`,
|
||||
font?.name,
|
||||
font?.fileTransName
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user