Blame view

ant-design-vue-jeecg/src/views/exception/ExceptionPage.vue 1.44 KB
肖超群 authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<template>
  <div class="exception">
    <div class="img">
      <img :src="config[type].img"/>
    </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>
肖超群 authored
17
import types from './type'
肖超群 authored
18
肖超群 authored
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
export default {
  name: "Exception",
  props: {
    type: {
      type: String,
      default: '404'
    }
  },
  data() {
    return {
      config: types
    }
  },
  methods: {
    handleToHome() {
      this.$router.push({name: 'dashboard'})
肖超群 authored
35
36
    }
  }
肖超群 authored
37
}
肖超群 authored
38
39
40
</script>

<style lang="less" scoped>
肖超群 authored
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
.exception {
  min-height: 500px;
  height: 80%;
  align-items: center;
  text-align: center;
  margin-top: 150px;

  .img {
    display: inline-block;
    padding-right: 52px;
    zoom: 1;

    img {
      height: 360px;
      max-width: 430px;
肖超群 authored
56
    }
肖超群 authored
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
  }

  .content {
    display: inline-block;
    flex: auto;

    h1 {
      color: #434e59;
      font-size: 72px;
      font-weight: 600;
      line-height: 72px;
      margin-bottom: 24px;
    }

    .desc {
      color: rgba(0, 0, 0, .45);
      font-size: 20px;
      line-height: 28px;
      margin-bottom: 16px;
肖超群 authored
76
77
    }
  }
肖超群 authored
78
}
肖超群 authored
79
肖超群 authored
80
81
82
.mobile {
  .exception {
    margin-top: 30px;
肖超群 authored
83
肖超群 authored
84
85
86
87
88
89
    .img {
      padding-right: unset;

      img {
        height: 40%;
        max-width: 80%;
肖超群 authored
90
91
92
      }
    }
  }
肖超群 authored
93
}
肖超群 authored
94
</style>