error.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <div class="error">
  3. <p class="headline">{{tipWords}}</p>
  4. <p class="info">{{desWords}}</p>
  5. <router-link to="/" class="return-home">返回首页</router-link>
  6. </div>
  7. </template>
  8. <script>
  9. export default {
  10. name: 'pageErr',
  11. data() {
  12. return {
  13. tipWords: '对不起,您没有权限',
  14. desWords: '请联系管理员开通本页面的权限再来访问吧~',
  15. }
  16. },
  17. created(){
  18. if(this.$route.path === '/404'){
  19. this.tipWords = '找不到页面';
  20. this.desWords = '请检查您输入的网址是否正确';
  21. }
  22. },
  23. methods: {
  24. },
  25. }
  26. </script>
  27. <style lang="less" scoped>
  28. .animat(@duration, @delay){
  29. animation-name: slideUp;
  30. animation-duration: @duration;
  31. animation-delay: @delay;
  32. animation-fill-mode: forwards;
  33. opacity: 0;
  34. }
  35. .error {
  36. background:#f0f2f5;
  37. height:100vh;
  38. text-align: center;
  39. padding-top: 24vh;
  40. .headline {
  41. font-size: 20px;
  42. line-height: 24px;
  43. color: #1482f0;
  44. margin-bottom: 10px;
  45. .animat(0.5s, 0.1s);
  46. }
  47. .info {
  48. font-size: 13px;
  49. line-height: 21px;
  50. color: grey;
  51. margin-bottom: 30px;
  52. .animat(0.5s, 0.2s);
  53. }
  54. .return-home {
  55. display: inline-block;
  56. width: 110px;
  57. height: 36px;
  58. background: #1482f0;
  59. border-radius: 100px;
  60. text-align: center;
  61. color: #ffffff;
  62. font-size: 14px;
  63. line-height: 36px;
  64. cursor: pointer;
  65. .animat(0.5s, 0.3s);
  66. }
  67. }
  68. @keyframes slideUp {
  69. 0% {
  70. transform: translateY(60px);
  71. opacity: 0;
  72. }
  73. 100% {
  74. transform: translateY(0);
  75. opacity: 1;
  76. }
  77. }
  78. </style>