right-fill-pano.vue 1.3 KB

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