404.vue 830 B

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