| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <template>
- <div class="not-found">
- <div class="not-found-content">
- <div class="error-code">404</div>
- <h2>页面不存在</h2>
- <p>您访问的页面不存在,请检查链接是否正确</p>
- <el-button type="primary" @click="goHome">返回首页</el-button>
- </div>
- </div>
- </template>
- <script setup>
- import { useRouter } from 'vue-router'
- const router = useRouter()
- function goHome() {
- router.replace('/')
- }
- </script>
- <style lang="scss" scoped>
- .not-found {
- width: 100vw;
- height: 100vh;
- display: flex;
- align-items: center;
- justify-content: center;
- background: #f0f2f5;
- }
- .not-found-content {
- text-align: center;
- .error-code {
- font-size: 120px;
- font-weight: 700;
- color: #1890ff;
- line-height: 1;
- margin-bottom: 16px;
- opacity: 0.4;
- }
- h2 { font-size: 24px; color: #262626; margin-bottom: 12px; }
- p { color: #8c8c8c; margin-bottom: 24px; }
- }
- </style>
|