refactor: 默认字体Mac系统适配

This commit is contained in:
wangjiahao
2024-11-28 10:36:11 +08:00
parent 074e86cef9
commit 9f711737fa
6 changed files with 30 additions and 11 deletions

View File

@@ -1,12 +1,15 @@
import { cos, sin } from '@/utils/translate'
import {
CHART_FONT_FAMILY_MAP,
CHART_FONT_FAMILY_MAP_TRANS,
DEFAULT_COLOR_CASE,
DEFAULT_COLOR_CASE_DARK
DEFAULT_COLOR_CASE_DARK,
DEFAULT_INDICATOR_STYLE
} from '@/views/chart/components/editor/util/chart'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { useEmitt } from '@/hooks/web/useEmitt'
import { merge } from 'lodash-es'
import { defaultTo, merge } from 'lodash-es'
const dvMainStore = dvMainStoreWithOut()
export const LIGHT_THEME_COLOR_MAIN = '#000000'
@@ -424,7 +427,10 @@ export function adaptCurTheme(customStyle, customAttr) {
export function adaptTitleFontFamily(fontFamily, viewInfo) {
if (viewInfo) {
viewInfo.customStyle['text']['fontFamily'] = fontFamily
viewInfo.customStyle['text']['fontFamily'] = defaultTo(
CHART_FONT_FAMILY_MAP_TRANS[fontFamily],
fontFamily
)
}
}