404.vue 841 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <div class="flex flex-col justify-center page-container">
  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. <el-button type="primary" @click="goHome">回到首页</el-button>
  9. </div>
  10. </div>
  11. </template>
  12. <script lang="ts" setup>
  13. import { useRouter } from 'vue-router';
  14. const router = useRouter();
  15. function goHome() {
  16. router.push('/');
  17. }
  18. </script>
  19. <style lang="scss" scoped>
  20. .page-container {
  21. width: 100%;
  22. border-radius: 4px;
  23. padding-top: 100px;
  24. .text-center {
  25. h1 {
  26. color: var(--el-color-info);
  27. padding: 20px 0;
  28. }
  29. }
  30. img {
  31. width: 350px;
  32. margin: 0 auto;
  33. }
  34. }
  35. </style>