WholeProcessPlatform/frontend-sjgl/src/views/error-page/404.vue
2026-07-20 16:02:51 +08:00

48 lines
1.0 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.

<template>
<div class="error-page-container">
<a-result
status="404"
title="404"
sub-title="抱歉您访问的页面不存在请检查网址或返回首页"
>
<template #extra>
<a-space>
<a-button type="primary" @click="goHome">
<template #icon><home-outlined /></template>
回首页
</a-button>
</a-space>
</template>
</a-result>
</div>
</template>
<script setup lang="ts">
import { useRouter } from 'vue-router';
import { HomeOutlined, ReloadOutlined } from '@ant-design/icons-vue';
const router = useRouter();
// 返回首页(由 permission 守卫动态匹配第一个可用路由)
const goHome = () => {
router.push('/');
};
</script>
<style scoped>
.error-page-container {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #f0f2f5;
}
.error-page-container :deep(.ant-result) {
padding: 48px 32px;
background: #fff;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
</style>