feat(project): support dynamic title

This commit is contained in:
vben
2024-05-22 22:03:41 +08:00
parent e83adf0697
commit d1cdea430e
15 changed files with 44 additions and 4 deletions

View File

@@ -5,12 +5,14 @@ import { $t } from '@vben/locales';
import { staticPreference } from '@vben/preference';
import SelectItem from '../select-item.vue';
import SwitchItem from '../switch-item.vue';
defineOptions({
name: 'PreferenceGeneralConfig',
});
const locale = defineModel<string>('locale');
const dynamicTitle = defineModel<boolean>('dynamicTitle');
const localeItems: SelectListItem[] = staticPreference.supportLanguages.map(
(item) => ({
@@ -24,4 +26,7 @@ const localeItems: SelectListItem[] = staticPreference.supportLanguages.map(
<SelectItem v-model="locale" :items="localeItems">
{{ $t('preference.language') }}
</SelectItem>
<SwitchItem v-model="dynamicTitle">
{{ $t('preference.dynamic-title') }}
</SwitchItem>
</template>