6868
6969dd
7070 h3#basic_font {{ $t('setting__basic_font') }}
71- div
72- base-selection.gap-teft ( :list ="fontList" : model- value= "appSetting['common.font']" item-key ="id" item-name ="label" @update:model-value ="updateSetting({'common.font': $event})" )
71+ div( style ="--selection-width: 12rem;" )
72+ base-selection.gap-left ( :list ="fontList" : model- value= "fonts[0]" item-key ="id" item-name ="label" @update:model-value ="updateFonts($event, fonts[1])" )
73+ base-selection.gap-left ( v-if ="fonts[0]" : list= "fontList" : model- value= "fonts[1]" item-key ="id" item-name ="label" @update:model-value ="updateFonts(fonts[0], $event)" )
74+ //- base-selection.gap-teft(:list="fontList" :model-value="appSetting['common.font']" item-key="id" item-name="label" @update:model-value="updateSetting({'common.font': $event})")
7375
7476 dd
7577 h3#basic_lang {{ $t('setting__basic_lang') }}
@@ -300,6 +302,17 @@ export default {
300302 systemFontList .value = fonts .map (f => ({ id: f, label: f .replace (/ (^ "| "$ )/ g , ' ' ) }))
301303 })
302304
305+ const fonts = computed (() => {
306+ if (! appSetting[' common.font' ]) return [' ' , ' ' ]
307+ let [f1 = ' ' , f2 = ' ' ] = appSetting[' common.font' ].split (' ,' )
308+ return [f1 .trim (), f2 .trim ()]
309+ })
310+ const updateFonts = (font1 , font2 ) => {
311+ let font = []
312+ if (font1) font .push (font1)
313+ if (font2) font .push (font2)
314+ updateSetting ({ ' common.font' : font .join (' , ' ) })
315+ }
303316 const fontSizeList = computed (() => {
304317 return [
305318 { id: 14 , label: t (' setting__basic_font_size_14px' ) },
@@ -319,6 +332,8 @@ export default {
319332 autoTheme,
320333 showAllTheme,
321334 themeList,
335+ fonts,
336+ updateFonts,
322337 // currentStting,
323338 // themes,
324339 // themeClassName,
0 commit comments