App.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. // support Multi-language
  18. const { createConfirm } = useMessage();
  19. const { getAntdLocale } = useLocale();
  20. const appStore = useAppStoreWithOut();
  21. let token = localStorage.getItem('token');
  22. if (token) {
  23. const userStore = useUserStoreWithOut();
  24. userStore.setToken(token);
  25. // localStorage.removeItem('token');
  26. }
  27. // Listening to page changes and dynamically changing site titles
  28. useTitle();
  29. </script>
  30. <style lang="less">
  31. .desc-wrap-BasicTable {
  32. background-color: #f0f2f5;
  33. .vben-basic-table-form-container {
  34. padding: 0;
  35. }
  36. }
  37. .ant-checkbox-disabled + span {
  38. color: rgba(0, 0, 0, 0.85) !important;
  39. }
  40. .ant-modal div[aria-hidden="true"] {
  41. display: none !important;
  42. }
  43. </style>