index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <ContentBox
  3. id="go-chart-edit-layout"
  4. ref="editDomRef"
  5. :flex="true"
  6. :showTop="false"
  7. :showBottom="true"
  8. :depth="1"
  9. @drop="handleDrop"
  10. @dragover="handleDragOver"
  11. >
  12. <div id="go-chart-edit-content">
  13. <!-- 中间区域 -->
  14. <EditRange></EditRange>
  15. </div>
  16. <!-- 底部控制 -->
  17. <template #bottom>
  18. <EditBottom />
  19. </template>
  20. </ContentBox>
  21. </template>
  22. <script lang="ts" setup>
  23. import { onUnmounted, onMounted,toRefs } from 'vue'
  24. import { ContentBox } from '../ContentBox/index'
  25. import { EditRange } from './components/EditRange'
  26. import { EditBottom } from './components/EditBottom'
  27. import { useLayout } from './hooks/useLayout.hook'
  28. import { handleDrop, handleDragOver } from './hooks/useDrop.hook'
  29. // 布局处理
  30. useLayout()
  31. </script>
  32. <style lang="scss" scoped>
  33. @include goId(chart-edit-layout) {
  34. position: relative;
  35. width: 100%;
  36. overflow: hidden;
  37. @include background-image('background-point');
  38. @extend .go-point-bg;
  39. @include goId(chart-edit-content) {
  40. position: relative;
  41. top: 20px;
  42. left: 20px;
  43. transform-origin: left top;
  44. border: 1px solid rgba(0, 0, 0, 0);
  45. overflow: hidden;
  46. @extend .go-transition;
  47. &.content-resize {
  48. border-radius: 15px;
  49. @include hover-border-color('hover-border-color');
  50. }
  51. }
  52. }
  53. </style>