left-pano.vue 1.8 KB

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