github.com/easysoft/zendata@v0.0.0-20240513203326-705bd5a7fd67/ui/src/App.vue (about)

     1  <template>
     2    <a-config-provider :locale="locale">
     3      <div id="app">
     4        <router-view />
     5      </div>
     6    </a-config-provider>
     7  </template>
     8  
     9  <script>
    10  
    11  import { domTitle, setDocumentTitle } from './utils/dom'
    12  import { i18nRender } from '@/locales'
    13  
    14  export default {
    15    name: 'App',
    16    components: {
    17    },
    18  
    19    data() {
    20      return {
    21      };
    22    },
    23    computed: {
    24      locale () {
    25        // 切换语言时,更新标题
    26        const { title } = this.$route.meta
    27        title && (setDocumentTitle(`${i18nRender(title)} - ${domTitle}`))
    28        return this.$i18n.getLocaleMessage(this.$store.getters.lang).antLocale
    29      }
    30    }
    31  }
    32  </script>
    33  
    34  <style>
    35  #app {
    36    -webkit-font-smoothing: antialiased;
    37    -moz-osx-font-smoothing: grayscale;
    38  }
    39  </style>