Files
competition-website/src/views/NotFound.vue
WorkBuddy e8f0195b61 chore: 前端首次基线提交
运行必须源码:src/、public/、index.html、package.json 及构建配置。
已忽略运行非必须:node_modules/、dist/、.env*。
2026-08-17 12:25:42 +08:00

50 lines
1.2 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- ============================================================
NotFound.vue — 404 页面未找到
当用户访问未定义的路由时显示此页面
============================================================ -->
<template>
<div class="page-container">
<el-card shadow="hover">
<div class="text-center" style="padding: 60px 20px;">
<h1 style="font-size: 72px; color: #c9a84c; margin: 0;">404</h1>
<p style="font-size: 18px; margin: 20px 0; color: #606266;">
抱歉,您访问的页面不存在
</p>
<el-button type="primary" size="large" @click="goHome">
返回首页
</el-button>
</div>
</el-card>
</div>
</template>
<script setup lang="ts">
/**
* NotFound.vue — 404 页面未找到视图
* 当用户访问未定义的路由时显示此页面
*/
import { useRouter } from 'vue-router'
const router = useRouter()
/**
* 返回首页
*/
function goHome() {
router.push('/')
}
</script>
<style scoped>
.page-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 60vh;
padding: 40px 20px;
}
.text-center {
text-align: center;
}
</style>