right-fill-pano.vue 1.7 KB

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