index.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <div class="myNoPermission" v-if="show">
  3. <div class="myNoPermission_content">
  4. <i class="el-icon-info"></i>
  5. <span class="margin-left_10">您没有访问权限</span>
  6. </div>
  7. </div>
  8. </template>
  9. <script>
  10. export default {
  11. components: {},
  12. props: {},
  13. data() {
  14. return {
  15. show:false
  16. };
  17. },
  18. watch: {},
  19. computed: {},
  20. created() {},
  21. mounted() {
  22. var timer = setTimeout(()=>{
  23. this.show = false
  24. clearInterval(timer)
  25. },2000)
  26. },
  27. methods: {},
  28. };
  29. </script>
  30. <style lang="scss" scoped>
  31. .myNoPermission{
  32. position: absolute;
  33. left: 0;
  34. right: 0;
  35. top: 0;
  36. bottom: 0;
  37. margin: auto;
  38. width: 180px;
  39. height: 25px;
  40. z-index: 9999;
  41. padding: 15px;
  42. border: none;
  43. box-shadow: 0.01333rem 0.01333rem 0.26667rem rgba(0,0,0,0.3);
  44. border-radius: 0.04rem;
  45. background: #fff;
  46. overflow: hidden;
  47. font-size: 0.8rem;
  48. i{
  49. color: var(--bg);
  50. font-size: 1rem;
  51. }
  52. .myNoPermission_content{
  53. line-height: 25px;
  54. }
  55. }
  56. </style>