404-ufo.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <div class="not-found">
  3. <div class="not-found-content">
  4. <h1 class="error-code">404</h1>
  5. <h2 class="error-title">页面未找到</h2>
  6. <p class="error-desc">抱歉,您访问的页面不存在</p>
  7. <a-button type="primary" @click="goHome">返回首页</a-button>
  8. </div>
  9. </div>
  10. </template>
  11. <script setup>
  12. import { useRouter } from 'vue-router'
  13. const router = useRouter()
  14. const goHome = () => {
  15. router.push('/ufo/home')
  16. }
  17. </script>
  18. <style lang="less" scoped>
  19. .not-found {
  20. display: flex;
  21. align-items: center;
  22. justify-content: center;
  23. min-height: 500px;
  24. padding: 32px;
  25. background: var(--bg-color);
  26. .not-found-content {
  27. text-align: center;
  28. .error-code {
  29. font-size: 120px;
  30. font-weight: bold;
  31. color: var(--primary-color);
  32. margin: 0;
  33. line-height: 1.2;
  34. }
  35. .error-title {
  36. font-size: 24px;
  37. color: var(--text-primary);
  38. margin: 16px 0;
  39. }
  40. .error-desc {
  41. font-size: 16px;
  42. color: var(--text-secondary);
  43. margin-bottom: 24px;
  44. }
  45. .ant-btn {
  46. &.ant-btn-primary {
  47. background: var(--primary-color);
  48. border-color: var(--primary-color);
  49. &:hover {
  50. background: var(--primary-color-hover);
  51. border-color: var(--primary-color-hover);
  52. }
  53. }
  54. }
  55. }
  56. }
  57. </style>