App.vue 709 B

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <loading v-if="show" />
  3. <n-config-provider
  4. preflight-style-disabled
  5. inline-theme-disabled
  6. :theme-overrides="themeOverrides"
  7. :locale="zhCN"
  8. :date-locale="dateZhCN"
  9. >
  10. <n-notification-provider>
  11. <router-view />
  12. </n-notification-provider>
  13. </n-config-provider>
  14. </template>
  15. <script setup lang='ts'>
  16. import loading from '@/components/loading.vue'
  17. import useStore from './store/index'
  18. import { computed } from 'vue'
  19. import { zhCN, dateZhCN } from 'naive-ui'
  20. import Theme from '@/assets/naive-theme'
  21. const store = useStore()
  22. const show = computed(() => store.loading)
  23. const themeOverrides = Theme
  24. </script>
  25. <style>
  26. html,
  27. body {
  28. margin: 0;
  29. padding: 0;
  30. }
  31. </style>