mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 02:06:38 +08:00
67 lines
1.1 KiB
Vue
67 lines
1.1 KiB
Vue
<template>
|
|
<div class="wrapper">
|
|
<img src="/images/default.jpg">
|
|
<div v-if='error.statusCode==404'>
|
|
<h2>{{ error.statusCode }} 找不到指定页面</h2>
|
|
<div>
|
|
<a href="javascript:history.back()">返回上一页</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div v-if='error.statusCode!=404'>
|
|
<h2>{{ error.statusCode }} 发现未知错误</h2>
|
|
<div>
|
|
<a href="/">返回首页</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: ['error'],
|
|
layout: 'error',
|
|
created(){
|
|
|
|
},
|
|
method:{
|
|
backToLastPage(){
|
|
window.history.back();
|
|
},
|
|
backToHome(){
|
|
window.location.href="/";
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="less" scoped >
|
|
html,body{
|
|
width:100%;
|
|
height:100%;
|
|
overflow:hidden;
|
|
}
|
|
.wrapper{
|
|
width:100%;
|
|
height:100%;
|
|
display:flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
text-align: center;
|
|
}
|
|
h2{
|
|
font-size: 2.5rem;
|
|
line-height: 3.5rem;
|
|
color:#e2001a;
|
|
}
|
|
a{
|
|
color:#666;
|
|
text-decoration: none;
|
|
padding-bottom:.25rem;
|
|
border-bottom: 1px solid #666;
|
|
}
|
|
a:hover {
|
|
color:#e2001a;
|
|
border-color: #e2001a;
|
|
}
|
|
</style> |