left-pano.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <span
  3. class="ctrl-pano-c fun-ctrl strengthen-right strengthen-top strengthen-bottom"
  4. v-if="custom.viewMode !== 'full' && custom.showLeftCtrlPano"
  5. @click="custom.showLeftPano = !custom.showLeftPano"
  6. :class="{ active: custom.showLeftPano }">
  7. <ui-icon type="extend" class="icon"></ui-icon>
  8. </span>
  9. <div class="left-pano strengthen">
  10. <slot></slot>
  11. </div>
  12. </template>
  13. <script lang="ts" setup>
  14. import { custom } from '@/env'
  15. </script>
  16. <style lang="scss" scoped>
  17. .left-pano {
  18. position: absolute;
  19. width: var(--left-pano-width);
  20. background: rgba(27,27,28,0.8);
  21. top: calc(var(--editor-head-height) + var(--header-top));
  22. left: var(--left-pano-left);
  23. bottom: var(--editor-menu-bottom);
  24. z-index: 1000;
  25. backdrop-filter: blur(4px);
  26. overflow-y: auto;
  27. transition: all .3s ease;
  28. }
  29. .ctrl-pano-c {
  30. position: absolute;
  31. left: calc(var(--left-pano-left) + var(--left-pano-width));
  32. width: 20px;
  33. height: 80px;
  34. background: rgba(26, 26, 26, 0.8);
  35. border-radius: 0 6px 6px 0;
  36. top: 50%;
  37. transform: translateY(-50%);
  38. z-index: 1000;
  39. display: flex;
  40. align-items: center;
  41. justify-content: center;
  42. color: rgba(255, 255, 255, 0.6);
  43. font-size: 14px;
  44. cursor: pointer;
  45. transition: inset .3s ease, color .3s ease;
  46. &:hover {
  47. color: rgba(255, 255, 255, 1);
  48. }
  49. &:active {
  50. color: var(--colors-primary-base);
  51. }
  52. .icon {
  53. display: inline-block;
  54. transition: transform .3s ease;
  55. transform: rotate(0)
  56. }
  57. &.active {
  58. .icon {
  59. transform: rotate(180deg);
  60. }
  61. }
  62. }
  63. </style>