App.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <ConfigProvider :locale="getAntdLocale">
  3. <AppProvider>
  4. <RouterView />
  5. </AppProvider>
  6. </ConfigProvider>
  7. </template>
  8. <script lang="ts" setup>
  9. import { ConfigProvider } from 'ant-design-vue';
  10. import { AppProvider } from '/@/components/Application';
  11. import { useTitle } from '/@/hooks/web/useTitle';
  12. import { useLocale } from '/@/locales/useLocale';
  13. // import { useLocale } from '/@/locales/useLocale';
  14. import { useUserStoreWithOut } from '/@/store/modules/user';
  15. import { useAppStoreWithOut } from '/@/store/modules/app';
  16. import { useMessage } from '/@/hooks/web/useMessage';
  17. import zhCN from 'ant-design-vue/es/locale/zh_CN';
  18. // support Multi-language
  19. const { createConfirm } = useMessage();
  20. const { getAntdLocale } = useLocale();
  21. const appStore = useAppStoreWithOut();
  22. let token = localStorage.getItem('token');
  23. if (token) {
  24. const userStore = useUserStoreWithOut();
  25. userStore.setToken(token);
  26. // localStorage.removeItem('token');
  27. }
  28. // Listening to page changes and dynamically changing site titles
  29. useTitle();
  30. </script>
  31. <style lang="less">
  32. .desc-wrap-BasicTable {
  33. background-color: #f0f2f5;
  34. .vben-basic-table-form-container {
  35. padding: 0;
  36. }
  37. }
  38. .ant-checkbox-disabled + span {
  39. color: rgba(0, 0, 0, 0.85) !important;
  40. }
  41. .ant-modal div[aria-hidden="true"] {
  42. display: none !important;
  43. }
  44. </style>