left-pano.vue 1.7 KB

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