新增设置-基本设置-软件字体设置
This commit is contained in:
@@ -45,12 +45,16 @@ dd(:tips="$t('setting__basic_sourcename_title')")
|
||||
div
|
||||
base-checkbox.gap-left(v-for="item in sourceNameTypes" :key="item.id" :id="`setting_abasic_sourcename_${item.id}`"
|
||||
name="setting_basic_sourcename" need v-model="currentStting.sourceNameType" :value="item.id" :label="item.label")
|
||||
|
||||
dd
|
||||
h3#basic_control_btn_position {{$t('setting__basic_control_btn_position')}}
|
||||
div
|
||||
base-checkbox.gap-left(v-for="item in controlBtnPositionList" :key="item.id" :id="`setting_basic_control_btn_position_${item.id}`"
|
||||
name="setting_basic_control_btn_position" need v-model="currentStting.controlBtnPosition" :value="item.id" :label="item.name")
|
||||
dd
|
||||
h3#basic_font {{$t('setting__basic_font')}}
|
||||
div
|
||||
base-selection.gap-teft(:list="fontList" v-model="currentStting.font" item-key="id" item-name="label")
|
||||
|
||||
play-timeout-modal(v-model="isShowPlayTimeoutModal")
|
||||
user-api-modal(v-model="isShowUserApiModal")
|
||||
</template>
|
||||
@@ -63,10 +67,12 @@ import { currentStting } from '../setting'
|
||||
import { setWindowSize } from '@renderer/utils'
|
||||
import apiSourceInfo from '@renderer/utils/music/api-source-info'
|
||||
import { useTimeout } from '@renderer/utils/timeoutStop'
|
||||
import { getSystemFonts } from '@renderer/utils/tools'
|
||||
|
||||
import PlayTimeoutModal from './PlayTimeoutModal'
|
||||
import UserApiModal from './UserApiModal'
|
||||
|
||||
|
||||
export default {
|
||||
name: 'SettingBasic',
|
||||
components: {
|
||||
@@ -144,6 +150,13 @@ export default {
|
||||
]
|
||||
})
|
||||
|
||||
const systemFontList = ref([])
|
||||
const fontList = computed(() => {
|
||||
return [{ id: '', label: t('setting__desktop_lyric_font_default') }, ...systemFontList.value]
|
||||
})
|
||||
getSystemFonts().then(fonts => {
|
||||
systemFontList.value = fonts.map(f => ({ id: f, label: f.replace(/(^"|"$)/g, '') }))
|
||||
})
|
||||
|
||||
return {
|
||||
currentStting,
|
||||
@@ -156,6 +169,7 @@ export default {
|
||||
langList,
|
||||
sourceNameTypes,
|
||||
controlBtnPositionList,
|
||||
fontList,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ export const currentStting = ref({
|
||||
langId: 'cns',
|
||||
themeId: 0,
|
||||
sourceId: 0,
|
||||
font: '',
|
||||
isShowAnimation: true,
|
||||
randomAnimate: true,
|
||||
isAgreePact: false,
|
||||
|
||||
Reference in New Issue
Block a user