import { css } from "@linaria/core"; import { defineUI } from "queenjs"; import { onUnmounted } from "vue"; import { Container, Draggable } from "vue-dndrop"; import { useEditor } from "../../.."; import { HotKeyCtrl } from "../../../controllers/HotKeyCtrl"; import Canvas from "../../Canvas"; export default defineUI({ setup() { const editor = useEditor(); const { store, actions, config } = editor; const hotKeyCtrl = new HotKeyCtrl(editor); hotKeyCtrl.init(); onUnmounted(() => { hotKeyCtrl.destroy(); }); return () => (
{store.isEditMode ? ( actions.moveComp(e.removedIndex, e.addedIndex)} non-drag-area-selector={".drag-disable"} > {store.designData.content.map((d) => { const Comp: any = config.compUI[d.compKey]?.Component; return Comp ? ( ) : undefined; })} ) : ( )}
); }, }); const contentStyle = css` border: 1px solid transparent; @apply min-h-750px bg-white; .dndrop-container.vertical > .dndrop-draggable-wrapper { overflow: unset; } `;