<template>
  <a-config-provider :locale="locale">
    <div id="app">
      <router-view />
    </div>
  </a-config-provider>
</template>

<script>
import { domTitle, setDocumentTitle } from '@/utils/domUtil'
import { i18nRender } from '@/locales'
import zhCN from '@/locales/lang/zh-CN'
import enUS from '@/locales/lang/en-US'

export default {
  data() {
    return {}
  },
  mounted(){

      //document.body.style.zoom =1.2

  },
  computed: {
    locale() {
      // 只是为了切换语言时，更新标题
      const { title } = this.$route.meta
      title && setDocumentTitle(`${i18nRender(title)} - ${domTitle}`)
      const { lang } = this.$store.getters
      const antLocale = require(`@/locales/lang/${lang}`).default.antLocale

      return antLocale
    },
  },
}
</script>
