大屏项目初始化
This commit is contained in:
66
screen-vue/src/views/error/404.vue
Normal file
66
screen-vue/src/views/error/404.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<div class="page-404">
|
||||
<div class="error-code">404</div>
|
||||
<div class="error-message">页面不存在</div>
|
||||
<button @click="goBack" class="back-btn">返回上一页</button>
|
||||
<button @click="goDashboard" class="home-btn">返回首页</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
// 返回上一页
|
||||
const goBack = () => {
|
||||
router.go(-1)
|
||||
}
|
||||
|
||||
// 返回后台首页
|
||||
const goDashboard = () => {
|
||||
router.push('/dashboard')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page-404 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 20px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.error-code {
|
||||
font-size: 80px;
|
||||
font-weight: bold;
|
||||
color: #e54d42;
|
||||
}
|
||||
|
||||
.error-message {
|
||||
font-size: 24px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.back-btn, .home-btn {
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.back-btn {
|
||||
background: #f5f5f5;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.home-btn {
|
||||
background: #1989fa;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user