Files
laws-sinotruk-client/src/views/exception/ExceptionPage.vue
T

92 lines
1.5 KiB
Vue

<template>
<div class="exception">
<div class="img">
<img :src="config[type].img" alt="" />
</div>
<div class="content">
<h1>{{ config[type].title }}</h1>
<div class="desc">{{ config[type].desc }}</div>
<div class="action">
<a-button type="primary" @click="handleToHome">返回首页</a-button>
</div>
</div>
</div>
</template>
<script>
import types from './type'
export default {
name: 'Exception',
props: {
type: {
type: String,
default: '404'
}
},
data () {
return {
config: types
}
},
methods: {
handleToHome () {
this.$router.push({ name: 'dashboard' })
}
}
}
</script>
<style lang="less" scoped>
.exception {
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.img > img {
height: 260px;
}
.content {
margin-top: 24px;
h1 {
font-size: 20px;
font-family: PingFang SC-Medium, PingFang SC, sans-serif;
color: #1D2129;
text-align: center;
font-weight: bold;
}
.desc {
font-size: 14px;
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
color: #86909C;
line-height: 22px;
}
}
.action {
margin-top: 32px;
text-align: center;
}
}
.mobile {
.exception {
margin-top: 30px;
.img {
padding-right: unset;
img {
height: 40%;
max-width: 80%;
}
}
}
}
</style>