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

<script>
import { domTitle, setDocumentTitle } from '@/utils/domUtil'
import { i18nRender } from '@/locales'

export default {
  data() {
    return {}
  },
  computed: {
    locale() {
      // 只是为了切换语言时，更新标题
      const { title } = this.$route.meta
      title && setDocumentTitle(`${i18nRender(title)} - ${domTitle}`)

      return this.$i18n.getLocaleMessage(this.$store.getters.lang).antLocale
    },
  },
}
</script>

<style>
.ant-table td {
  white-space: nowrap !important;
}
.ant-table th {
  white-space: nowrap !important;
}
.ant-table-thead > tr > th,
.ant-table-tbody > tr > td {
  padding: 8px 8px !important;
  overflow-wrap: break-word;
  font-size: 14px;
}
.flexRowStart {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}
.flexRowCenter {
  display: flex;
  flex-direction: row;
  align-items: center;
}
.flexCenterCenter {
  display: flex;
  justify-content: center;
  align-items: center;
}
.flexColumnCenterCenter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.shaixuan_float_left {
  float: left;
  margin-right: 20px;
}

.flex {
  display: flex;
}
.flex-rr {
  display: flex;
  flex-direction: row-reverse;
}
.flex-c {
  display: flex;
  flex-direction: column;
}
.flex-cr {
  display: flex;
  flex-direction: column-reverse;
}
.flex-1 {
  flex: 1;
}
.ai-fs {
  align-items: flex-start;
}
.ai-fe {
  align-items: flex-end;
}
.ai-c {
  align-items: center;
}
.ai-s {
  align-items: stretch;
}
.jc-c {
  justify-content: center;
}
.jc-sb {
  justify-content: space-between;
}
.jc-sa {
  justify-content: space-around;
}
.jc-fs {
  justify-content: flex-start;
}
.jc-fe {
  justify-content: flex-end;
}
.fw-w {
  flex-wrap: wrap;
}
.fw-n {
  flex-wrap: nowrap;
}
.fw-wr {
  flex-wrap: wrap-reverse;
}

.scroller {
  overflow: auto;
}
.scroller-x {
  overflow-x: auto;
}
.scroller-y {
  overflow-y: auto;
}
</style>
