1
0
mirror of https://github.com/elk-zone/elk synced 2024-12-16 07:37:59 +09:00
elk/components/settings/SettingsLanguage.vue
2023-01-13 01:52:52 +08:00

17 lines
467 B
Vue

<script lang="ts" setup>
import type { ComputedRef } from 'vue'
import type { LocaleObject } from '#i18n'
const userSettings = useUserSettings()
const { locales } = useI18n() as { locales: ComputedRef<LocaleObject[]> }
</script>
<template>
<select v-model="userSettings.language">
<option v-for="item in locales" :key="item.code" :value="item.code" :selected="userSettings.language === item.code">
{{ item.name }}
</option>
</select>
</template>