文档管理
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
1.6 KiB

6 months ago
<template>
<div class="exception-page">
<div class="exception-image">
<img :src="type === '403' ? permission : notFound" />
<slot name="description"></slot>
</div>
<div class="exception-btns">
<el-button
class="exception-button"
type="primary"
@click="
() => {
6 months ago
router.push('/file/document')
6 months ago
}
"
>返回首页</el-button
>
<el-button
class="exception-button"
type="primary"
@click="
() => {
router.back()
}
"
>返回上一页</el-button
>
</div>
</div>
</template>
<script lang="ts" setup>
import { useRouter } from 'vue-router'
import permission from '@/assets/image/dashboard/exception/no-permission.svg'
import notFound from '@/assets/image/dashboard/exception/not-found.svg'
defineOptions({ name: 'Exception' })
const router = useRouter()
interface Props {
type: '403' | '404'
}
defineProps<Props>()
</script>
<style scoped lang="scss">
.exception-page {
position: relative;
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
.exception-image {
width: 100%;
height: calc(100vh - 300px);
img {
width: 100%;
height: 92%;
}
}
.exception-btns {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20px;
.exception-button {
width: 100px;
margin: 0 10px;
}
}
// .exception-button {
// width: 100px;
// position: absolute;
// top: 2%;
// left: 2%;
// }
}
</style>