index.vue 443 B

123456789101112131415161718
  1. <template>
  2. <el-config-provider :button="{ autoInsertSpace: true }" :locale="locale">
  3. <router-view />
  4. <vab-update v-if="pwa" />
  5. </el-config-provider>
  6. </template>
  7. <script lang="ts" setup>
  8. import { pwa } from '/@/config'
  9. import { enLocale, zhLocale } from '/@/i18n'
  10. defineOptions({
  11. name: 'VabApp',
  12. })
  13. const { locale: language } = useI18n()
  14. const locale = computed(() => (language.value === 'en' ? enLocale : zhLocale))
  15. </script>