NotFound.vue
1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<script setup lang="ts">
import { useRouter } from 'vue-router';
const router = useRouter();
const goHome = () => {
router.push('/home');
};
</script>
<template>
<div class="not-found-page">
<div class="not-found-content">
<div class="error-code">404</div>
<h2 class="error-title">页面未找到</h2>
<p class="error-desc">抱歉,您访问的页面不存在</p>
<button class="back-button" @click="goHome">返回首页</button>
</div>
</div>
</template>
<style scoped>
.not-found-page {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
background: linear-gradient(135deg, #eff2ff 0%, #f6edff 100%);
}
.not-found-content {
color: #383838;
text-align: center;
}
.error-code {
margin-bottom: 24px;
font-size: 120px;
font-weight: 700;
line-height: 1;
text-shadow: 0 4px 8px rgb(0 0 0 / 20%);
}
.error-title {
margin-bottom: 16px;
font-size: 32px;
font-weight: 600;
}
.error-desc {
margin-bottom: 32px;
font-size: 16px;
opacity: 0.9;
}
.back-button {
padding: 12px 32px;
font-size: 16px;
font-weight: 500;
color: #667eea;
cursor: pointer;
background: #fff;
border: none;
border-radius: 24px;
box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
transition: all 0.3s;
}
.back-button:hover {
box-shadow: 0 6px 16px rgb(0 0 0 / 20%);
transform: translateY(-2px);
}
</style>