<template>
  <a-config-provider :locale="locale">
    <div id="app">
      <router-view v-if="isRouterViewshow" />
    </div>
  </a-config-provider>
</template>
<script>
import zhCn from "ant-design-vue/lib/locale-provider/zh_CN";
export default {
  provide() {
    return {
      reload: this.loader,
    };
  },
  data() {
    return {
      isRouterViewshow: true,
      locale: zhCn,
    };
  },
  methods: {
    loader() {
      this.isRouterViewshow = false;
      // console.log(123);
      this.$nextTick(() => {
        this.isRouterViewshow = true;
      });
    },
  },
};
</script>
<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  // text-align: center;
  // color: #2c3e50;
  // width: 100vw;
  // overflow-x: overlay;
  height: 100%;
  width: 100vw;
}

#nav {
  padding: 30px;

  a {
    font-weight: normal;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
