43 lines
896 B
Vue
Raw Normal View History

2021-12-10 14:11:49 +08:00
<template>
<div class="go-error">
2021-12-10 14:11:49 +08:00
<div class="text-center">
<img src="~@/assets/images/exception/404.svg" alt="" />
</div>
<div class="text-center">
<h1 class="text-base text-gray-500">抱歉你访问的页面不存在</h1>
</div>
<n-button type="info" @click="goHome">回到首页</n-button>
2021-12-10 14:11:49 +08:00
</div>
</template>
<script lang="ts" setup>
import { useRouter } from 'vue-router'
import { PageEnum } from '@/enums/pageEnum'
2021-12-20 14:29:29 +08:00
import { routerTurnByName } from '@/utils'
const router = useRouter()
function goHome() {
2021-12-14 16:41:43 +08:00
routerTurnByName(PageEnum.BASE_HOME_NAME)
}
2021-12-10 14:11:49 +08:00
</script>
<style lang="scss" scoped>
@include go(error) {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
padding: 100px 0;
.text-center {
h1 {
color: #666;
padding: 20px 0;
2021-12-10 14:11:49 +08:00
}
}
2021-12-10 14:11:49 +08:00
img {
width: 350px;
margin: 0 auto;
2021-12-10 14:11:49 +08:00
}
}
2021-12-10 14:11:49 +08:00
</style>