index.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <div>
  3. <div class="box">
  4. <div class="left">
  5. <mailLeft ref="leftDom"></mailLeft>
  6. </div>
  7. <div class="right">
  8. <mailMain @changeFloderId="handleChangeFloderId"></mailMain>
  9. </div>
  10. </div>
  11. <div>
  12. <!-- 右边弹窗 -->
  13. <div :class="mailCon">
  14. <div class="changeBox" @click="handleClose()">
  15. <span
  16. v-if="showRight"
  17. class="iconfont icon-icomx_rightt1"
  18. style="color: #fff; font-size: 20px"
  19. ></span>
  20. <span
  21. v-if="!showRight"
  22. class="iconfont icon-iconm_leftt1"
  23. style="color: #fff; font-size: 20px"
  24. ></span>
  25. </div>
  26. <mailRight v-show="showRight" />
  27. </div>
  28. </div>
  29. </div>
  30. </template>
  31. <script setup>
  32. import mailLeft from "./com/left.vue";
  33. import mailMain from "./com/main.vue";
  34. import mailRight from "./com/right.vue";
  35. const mailCon = ref("mail-right-con");
  36. const showRight = ref(true);
  37. const handleClose = () => {
  38. if (showRight.value) {
  39. mailCon.value = "mail-right-con move-to-close";
  40. } else {
  41. mailCon.value = "mail-right-con";
  42. }
  43. showRight.value = !showRight.value;
  44. };
  45. const route = useRoute();
  46. const leftDom = ref(null);
  47. const handleChangeFloderId = (val) => {
  48. leftDom.value.changeFloderId(val);
  49. };
  50. onMounted(() => {
  51. if (route.query.mail) {
  52. leftDom.value.handleGoWrite({ email: route.query.mail, personal: null });
  53. }
  54. });
  55. </script>
  56. <style lang="scss" scoped>
  57. .box {
  58. width: calc(100vw - 0px);
  59. height: calc(100vh - 50px - 50px);
  60. padding: 10px;
  61. display: flex;
  62. position: relative;
  63. .left,
  64. .right {
  65. background: #fff;
  66. }
  67. .left {
  68. width: 300px;
  69. margin-right: 10px;
  70. box-sizing: border-box;
  71. }
  72. .right {
  73. flex: 1;
  74. }
  75. .mail-right {
  76. position: absolute;
  77. right: 0px;
  78. }
  79. }
  80. .mail-right-con {
  81. .changeBox {
  82. width: 40px;
  83. height: 40px;
  84. position: absolute;
  85. text-align: center;
  86. line-height: 40px;
  87. left: -40px;
  88. top: 5px;
  89. background: #ff9315;
  90. border-radius: 10px 0px 0px 10px;
  91. cursor: pointer;
  92. }
  93. // border-radius: 5px;
  94. border-top-left-radius: 5px;
  95. border-bottom-left-radius: 5px;
  96. z-index: 1000;
  97. position: fixed;
  98. margin-top: 50px;
  99. top: 0;
  100. width: 400px;
  101. transition: all cubic-bezier(0.05, 0.91, 0.22, 1.03) 0.5s;
  102. padding: 10px 15px 0px 15px;
  103. height: calc(100vh - 50px - 10px);
  104. background: white;
  105. left: 100%;
  106. margin-left: -398px;
  107. box-shadow: var(--devui-shadow-fullscreen-overlay, 0 10px 20px 0)
  108. var(--devui-shadow, rgba(0, 0, 0, 0.08));
  109. i {
  110. cursor: pointer;
  111. transition: all cubic-bezier(0, 0.88, 0, 1.29) 1s;
  112. font-size: 15px;
  113. position: relative;
  114. &:hover {
  115. color: #169bd5;
  116. transform: rotate(360deg);
  117. }
  118. }
  119. }
  120. .move-to-close {
  121. transform: translateX(400px);
  122. .mail-right {
  123. transition: all linear 0.3s;
  124. padding-left: 20px;
  125. }
  126. }
  127. </style>