App.vue 689 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <a-config-provider :locale="locale">
  3. <a-style-provider hash-priority="high">
  4. <router-view />
  5. </a-style-provider>
  6. </a-config-provider>
  7. </template>
  8. <script setup>
  9. import { RouterView } from 'vue-router';
  10. import { onBeforeMount, ref } from 'vue';
  11. import zhCN from 'ant-design-vue/es/locale/zh_CN';
  12. import dayjs from 'dayjs';
  13. import 'dayjs/locale/zh-cn';
  14. dayjs.locale('zh-cn');
  15. const locale = ref(zhCN)
  16. onBeforeMount(() => {
  17. document.title = window?.AppGlobalConfig?.system?.name || '';
  18. console.log(useRouter().currentRoute.value.redirectedFrom);
  19. })
  20. </script>
  21. <style lang="scss" scoped>
  22. ::v-deep(div.ant-popconfirm) {
  23. min-width: 200px;
  24. }
  25. </style>