right-fill-pano.vue 1.8 KB

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