404.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <div class="error-page">
  3. <div class="error-code">4<span>0</span>4</div>
  4. <div class="error-desc">啊哦~ 你所访问的页面不存在</div>
  5. <div class="error-handle">
  6. <router-link to="/">
  7. <el-button type="primary" size="large">返回首页</el-button>
  8. </router-link>
  9. <el-button class="error-btn" type="primary" size="large" @click="goBack">返回上一页</el-button>
  10. </div>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. methods: {
  16. goBack() {
  17. this.$router.go(-1);
  18. },
  19. },
  20. };
  21. </script>
  22. <style scoped>
  23. .error-page {
  24. display: flex;
  25. justify-content: center;
  26. align-items: center;
  27. flex-direction: column;
  28. width: 100%;
  29. height: 100%;
  30. background: #f3f3f3;
  31. box-sizing: border-box;
  32. }
  33. .error-code {
  34. line-height: 1;
  35. font-size: 250px;
  36. font-weight: bolder;
  37. color: #2d8cf0;
  38. }
  39. .error-code span {
  40. color: #00a854;
  41. }
  42. .error-desc {
  43. font-size: 30px;
  44. color: #777;
  45. }
  46. .error-handle {
  47. margin-top: 30px;
  48. padding-bottom: 200px;
  49. }
  50. .error-btn {
  51. margin-left: 100px;
  52. }
  53. </style>