48 lines
1.0 KiB
Vue
48 lines
1.0 KiB
Vue
<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>
|