Unverified Commit cfc3bbcd by Sendya

reactor: v2: ExceptionPage move to components/

parent c5cdf68a
<template> <template>
<div class="exception"> <div class="exception">
<div class="img"> <div class="img">
<img :src="config[type].img"/> <img :src="config[type].img"/>
</div> </div>
<div class="content"> <div class="content">
<h1>{{ config[type].title }}</h1> <h1>{{ config[type].title }}</h1>
<div class="desc">{{ config[type].desc }}</div> <div class="desc">{{ config[type].desc }}</div>
<div class="action"> <div class="action">
<a-button type="primary" @click="handleToHome">返回首页</a-button> <a-button type="primary" @click="handleToHome">返回首页</a-button>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import types from './type' import types from './type'
export default { export default {
name: 'Exception', name: 'Exception',
props: { props: {
type: { type: {
type: String, type: String,
default: '404' default: '404'
} }
}, },
data () { data () {
return { return {
config: types config: types
} }
}, },
methods: { methods: {
handleToHome () { handleToHome () {
this.$router.push({ name: 'dashboard' }) this.$router.push({ name: 'dashboard' })
} }
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.exception { .exception {
min-height: 500px; min-height: 500px;
height: 80%; height: 80%;
align-items: center; align-items: center;
text-align: center; text-align: center;
margin-top: 150px; margin-top: 150px;
.img { .img {
display: inline-block; display: inline-block;
padding-right: 52px; padding-right: 52px;
zoom: 1; zoom: 1;
img { img {
height: 360px; height: 360px;
max-width: 430px; max-width: 430px;
} }
} }
.content { .content {
display: inline-block; display: inline-block;
flex: auto; flex: auto;
h1 { h1 {
color: #434e59; color: #434e59;
font-size: 72px; font-size: 72px;
font-weight: 600; font-weight: 600;
line-height: 72px; line-height: 72px;
margin-bottom: 24px; margin-bottom: 24px;
} }
.desc { .desc {
color: rgba(0, 0, 0, .45); color: rgba(0, 0, 0, .45);
font-size: 20px; font-size: 20px;
line-height: 28px; line-height: 28px;
margin-bottom: 16px; margin-bottom: 16px;
} }
} }
} }
.mobile { .mobile {
.exception { .exception {
margin-top: 30px; margin-top: 30px;
.img { .img {
padding-right: unset; padding-right: unset;
img { img {
height: 40%; height: 40%;
max-width: 80%; max-width: 80%;
} }
} }
} }
} }
</style> </style>
import ExceptionPage from './ExceptionPage.vue'
export default ExceptionPage
...@@ -22,6 +22,7 @@ import STable from '@/components/Table' ...@@ -22,6 +22,7 @@ import STable from '@/components/Table'
import MultiTab from '@/components/MultiTab' import MultiTab from '@/components/MultiTab'
import Result from '@/components/Result' import Result from '@/components/Result'
import IconSelector from '@/components/IconSelector' import IconSelector from '@/components/IconSelector'
import ExceptionPage from '@/components/Exception'
export { export {
AvatarList, AvatarList,
...@@ -46,5 +47,6 @@ export { ...@@ -46,5 +47,6 @@ export {
STable, STable,
MultiTab, MultiTab,
Result, Result,
ExceptionPage,
IconSelector IconSelector
} }
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
</template> </template>
<script> <script>
import ExceptionPage from './ExceptionPage' import { ExceptionPage } from '@/components'
export default { export default {
components: { components: {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
</template> </template>
<script> <script>
import ExceptionPage from './ExceptionPage' import { ExceptionPage } from '@/components'
export default { export default {
components: { components: {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
</template> </template>
<script> <script>
import ExceptionPage from './ExceptionPage' import { ExceptionPage } from '@/components'
export default { export default {
components: { components: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment