403.vue 900 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <div class="go-error">
  3. <div class="text-center">
  4. <img src="~@/assets/images/exception/403.svg" alt="" />
  5. </div>
  6. <div class="text-center">
  7. <h1 class="text-base text-gray-500">抱歉,你无权访问该页面</h1>
  8. <n-button type="info" @click="goHome">回到首页</n-button>
  9. </div>
  10. </div>
  11. </template>
  12. <script lang="ts" setup>
  13. import { useRouter } from 'vue-router'
  14. import { PageEnum } from '@/enums/pageEnum'
  15. import { routerTurnByName } from '@/utils/page'
  16. const router = useRouter()
  17. function goHome() {
  18. routerTurnByName(PageEnum.BASE_HOME_NAME)
  19. }
  20. </script>
  21. <style lang="scss" scoped>
  22. @include go(error) {
  23. display: flex;
  24. flex-direction: column;
  25. align-items: center;
  26. width: 100%;
  27. padding: 100px 0;
  28. .text-center {
  29. h1 {
  30. color: #666;
  31. padding: 20px 0;
  32. }
  33. }
  34. img {
  35. width: 350px;
  36. margin: 0 auto;
  37. }
  38. }
  39. </style>