mod: 美化404页面
This commit is contained in:
parent
c761501855
commit
b5fde56177
BIN
src/assets/imgs/404/404.png
Normal file
BIN
src/assets/imgs/404/404.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
@ -18,7 +18,7 @@ import AppMain from './components/AppMain.vue'
|
|||||||
</n-layout-header>
|
</n-layout-header>
|
||||||
<n-layout
|
<n-layout
|
||||||
position="absolute"
|
position="absolute"
|
||||||
content-style="padding: 0 35px 35px"
|
content-style="padding: 0 35px 35px;height: 100%;"
|
||||||
style="top: 100px; background-color: #f5f6fb"
|
style="top: 100px; background-color: #f5f6fb"
|
||||||
:native-scrollbar="false"
|
:native-scrollbar="false"
|
||||||
>
|
>
|
||||||
|
@ -51,6 +51,26 @@ export const basicRoutes = [
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: 'ERROR-PAGE',
|
||||||
|
path: '/error-page',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/error-page/404',
|
||||||
|
meta: {
|
||||||
|
title: '错误页',
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: 'ERROR-404',
|
||||||
|
path: '404',
|
||||||
|
component: () => import('@/views/error-page/404.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '404',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'TEST',
|
name: 'TEST',
|
||||||
path: '/test',
|
path: '/test',
|
||||||
@ -92,7 +112,7 @@ export const basicRoutes = [
|
|||||||
path: '/external-link',
|
path: '/external-link',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
meta: {
|
meta: {
|
||||||
title: '外链',
|
title: '外部链接',
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
<script setup>
|
||||||
|
import { NResult, NButton } from 'naive-ui'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
|
const { replace } = useRouter()
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<h1>404</h1>
|
<div class="page-404">
|
||||||
|
<n-result status="404" description="抱歉,您访问的页面不存在。">
|
||||||
|
<template #icon>
|
||||||
|
<img src="@/assets/imgs/404/404.png" width="500" />
|
||||||
|
</template>
|
||||||
|
<template #footer>
|
||||||
|
<n-button @click="replace('/')">返回首页</n-button>
|
||||||
|
</template>
|
||||||
|
</n-result>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.page-404 {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user