chore: remove flatPreferences

This commit is contained in:
vben
2024-06-09 12:53:38 +08:00
parent a344d32169
commit 68229a4d2f
20 changed files with 462 additions and 224 deletions

View File

@@ -11,9 +11,9 @@ defineOptions({
name: 'PreferenceGeneralConfig',
});
const locale = defineModel<string>('locale');
const dynamicTitle = defineModel<boolean>('dynamicTitle');
const shortcutKeys = defineModel<boolean>('shortcutKeys');
const appLocale = defineModel<string>('appLocale');
const appDynamicTitle = defineModel<boolean>('appDynamicTitle');
const shortcutKeysEnable = defineModel<boolean>('shortcutKeysEnable');
const localeItems: SelectListItem[] = SUPPORT_LANGUAGES.map((item) => ({
label: item.text,
@@ -22,13 +22,13 @@ const localeItems: SelectListItem[] = SUPPORT_LANGUAGES.map((item) => ({
</script>
<template>
<SelectItem v-model="locale" :items="localeItems">
<SelectItem v-model="appLocale" :items="localeItems">
{{ $t('preference.language') }}
</SelectItem>
<SwitchItem v-model="dynamicTitle">
<SwitchItem v-model="appDynamicTitle">
{{ $t('preference.dynamic-title') }}
</SwitchItem>
<SwitchItem v-model="shortcutKeys">
<SwitchItem v-model="shortcutKeysEnable">
{{ $t('preference.shortcut-key') }}
</SwitchItem>
</template>