553a7637ec2e4cb2ca1f73642993713afec43da3.svn-base 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <div class="exception">
  3. <div class="img">
  4. <img :src="config[type].img"/>
  5. </div>
  6. <div class="content">
  7. <h1>{{ config[type].title }}</h1>
  8. <div class="desc">{{ config[type].desc }}</div>
  9. <div class="action">
  10. <a-button type="primary" @click="handleToHome">返回首页</a-button>
  11. </div>
  12. </div>
  13. </div>
  14. </template>
  15. <script>
  16. import types from './type'
  17. export default {
  18. name: "Exception",
  19. props: {
  20. type: {
  21. type: String,
  22. default: '404'
  23. }
  24. },
  25. data() {
  26. return {
  27. config: types
  28. }
  29. },
  30. methods: {
  31. handleToHome () {
  32. this.$router.push({ name: 'dashboard' })
  33. }
  34. }
  35. }
  36. </script>
  37. <style lang="less" scoped>
  38. .exception {
  39. min-height: 500px;
  40. height: 80%;
  41. align-items: center;
  42. text-align: center;
  43. margin-top: 150px;
  44. .img {
  45. display: inline-block;
  46. padding-right: 52px;
  47. zoom: 1;
  48. img {
  49. height: 360px;
  50. max-width: 430px;
  51. }
  52. }
  53. .content {
  54. display: inline-block;
  55. flex: auto;
  56. h1 {
  57. color: #434e59;
  58. font-size: 72px;
  59. font-weight: 600;
  60. line-height: 72px;
  61. margin-bottom: 24px;
  62. }
  63. .desc {
  64. color: rgba(0, 0, 0, .45);
  65. font-size: 20px;
  66. line-height: 28px;
  67. margin-bottom: 16px;
  68. }
  69. }
  70. }
  71. .mobile {
  72. .exception {
  73. margin-top: 30px;
  74. .img {
  75. padding-right: unset;
  76. img {
  77. height: 40%;
  78. max-width: 80%;
  79. }
  80. }
  81. }
  82. }
  83. </style>