import { useEditor } from "@/modules/editor"; import { DesignComp } from "@/modules/editor/objects/DesignTemp/DesignComp"; import { SelItemsAlignTools, CompAlignTools } from "@/modules/editor/objects/Toolbars/liveTools"; import { css } from "@linaria/core"; import { defineComponent } from "vue"; import { string } from "vue-types"; export default defineComponent({ props: { value: string(), }, setup(props) { const editor = useEditor(); return ()=>{ return ( <> { editor.store.selected.length > 1 &&
元素 (已选{editor.store.selected.length})
对齐
{SelItemsAlignTools.Left.map((item) => { return item.getVisible.call(editor, null as any) ? ( item.onClick.call(editor, null as any)} /> ) : null; })}
{SelItemsAlignTools.right.map((item) => { return item.getVisible.call(editor, null as any) ? ( item.onClick.call(editor, null as any)} /> ) : null; })}
布局
对齐
{CompAlignTools.Left.map((item) => { return item.getVisible.call(editor, null as any) ? ( item.onClick.call(editor, null as any, true)} /> ) : null; })}
{CompAlignTools.right.map((item) => { return item.getVisible.call(editor, null as any) ? ( item.onClick.call(editor, null as any, true)} /> ) : null; })}
} ); }; }, }); const AlignToolsStyle = css` flex: 1; display: flex; flex-direction: column; .row { background: #303030; border-radius: 4px 4px 4px 4px; } `;