403.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <div class="error-page">
  3. <div class="error-box">
  4. <div class="error-code">403</div>
  5. <div class="error-desc">啊哦~ 你没有权限访问该页面哦</div>
  6. <div class="error-handle">
  7. <router-link to="/">
  8. <el-button type="primary" size="large">返回首页</el-button>
  9. </router-link>
  10. <el-button class="error-btn" size="large" @click="goBack">返回上一页</el-button>
  11. </div>
  12. </div>
  13. </div>
  14. </template>
  15. <script setup lang="ts" name="403">
  16. import { useRouter } from 'vue-router';
  17. const router = useRouter();
  18. const goBack = () => {
  19. router.go(-2);
  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: 100vh;
  30. background: #eef0fc;
  31. box-sizing: border-box;
  32. }
  33. .error-box {
  34. width: 400px;
  35. background-color: #fff;
  36. padding: 80px 50px;
  37. border-radius: 5px;
  38. }
  39. .error-code {
  40. line-height: 1;
  41. font-size: 100px;
  42. font-weight: bold;
  43. color: var(--el-color-primary);
  44. margin-bottom: 20px;
  45. text-align: center;
  46. }
  47. .error-desc {
  48. font-size: 20px;
  49. color: #777;
  50. text-align: center;
  51. }
  52. .error-handle {
  53. margin-top: 50px;
  54. text-align: center;
  55. }
  56. .error-btn {
  57. margin-left: 100px;
  58. }
  59. </style>