error.vue 814 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <div class="errorBox">
  3. <img src="./public/error/404.png" alt="">
  4. <div @click="goHome" class="goHome">
  5. 返回网站首页
  6. </div>
  7. </div>
  8. </template>
  9. <script setup>
  10. //import { ElButton } from 'element-plus'
  11. const router = useRouter()
  12. //跳转回到首页
  13. const goHome = () => {
  14. router.push('/')
  15. }
  16. </script>
  17. <style lang="less" scoped>
  18. .errorBox {
  19. width: 100%;
  20. text-align: center;
  21. padding-top: 150px;
  22. img {
  23. width: 532px;
  24. height: 440px;
  25. margin: 0 auto;
  26. }
  27. .goHome {
  28. width: 152px;
  29. height: 48px;
  30. line-height: 48px;
  31. font-size: 16px;
  32. color: #fff;
  33. text-align: center;
  34. margin: 0 auto;
  35. background: #028E21;
  36. border-radius: 8px;
  37. margin-top: 70px;
  38. cursor: pointer;
  39. }
  40. }
  41. </style>