errorPage.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <div class="errorPage">
  3. <div class="error">
  4. <img src="./imgs/404.png" class="img" alt="" />
  5. <div class="tit">页面找不到了~</div>
  6. <!-- <ElButton class="backBtn" type="primary" plain @click="handleGoHome">返回</ElButton> -->
  7. </div>
  8. </div>
  9. </template>
  10. <script setup lang="ts">
  11. import { useRouter } from "vue-router"
  12. import { ElButton } from "element-plus"
  13. const router = useRouter()
  14. function handleGoHome() {
  15. router.back()
  16. }
  17. </script>
  18. <style lang="scss" scoped>
  19. .errorPage {
  20. width: 100%;
  21. height: 100%;
  22. display: flex;
  23. justify-content: center;
  24. align-items: center;
  25. .error {
  26. background-color: #fff;
  27. display: flex;
  28. flex-direction: column;
  29. justify-content: center;
  30. align-items: center;
  31. margin-top: -100px;
  32. .img {
  33. width: 272px;
  34. height: 227px;
  35. }
  36. .tit {
  37. font-weight: 400;
  38. font-size: 16px;
  39. color: #999999;
  40. margin-top: 16px;
  41. margin-bottom: 20px;
  42. }
  43. .backBtn {
  44. width: 88px;
  45. height: 36px;
  46. }
  47. }
  48. }
  49. </style>