404.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <div>
  3. <div class="page-img">
  4. <img src="../assets/404.png" />
  5. </div>
  6. <p class="page-container"><b>Error</b> 非常抱歉你访问的页面不存在!!!</p>
  7. <div class="page-button">
  8. <el-button type="primary" round @click="back" icon="el-icon-s-promotion">返回首页</el-button>
  9. </div>
  10. </div>
  11. </template>
  12. <script lang="ts" setup>
  13. import { useRouter } from "vue-router";
  14. import { useStore } from "@/store/index"
  15. const router = useRouter();
  16. const { clearStore } = useStore()
  17. function back() {
  18. clearStore();
  19. router.replace('/login');
  20. }
  21. </script>
  22. <style lang="scss" scoped>
  23. .page-img {
  24. text-align: center;
  25. display: flex;
  26. justify-content: center;
  27. padding: 100px 0 0 0;
  28. img {
  29. width: 600px;
  30. }
  31. }
  32. .page-container {
  33. font-size: 20px;
  34. text-align: center;
  35. color: rgb(192, 204, 218);
  36. b {
  37. margin-right: 30px;
  38. font-size: 26px;
  39. }
  40. }
  41. .page-button {
  42. text-align: center;
  43. margin-top: 40px;
  44. .el-button.is-round {
  45. width: 150px;
  46. margin-right: 80px;
  47. }
  48. }
  49. </style>