import Empty from "@/components/Empty"; import { useEditor } from "@/modules/editor"; import { ICompKeys } from "@/modules/editor/typings"; import { useResource } from "@/modules/resource"; import { Loadmore } from "@queenjs/ui"; import { useReactive } from "@queenjs/use"; import { defineComponent } from "vue"; import { Container, Draggable } from "vue-dndrop"; import { CompList } from "./CompList"; export default defineComponent({ setup() { const editor = useEditor(); const { compUICtrl } = editor.controls; const resource = useResource(); const { sysShapeListCtrl } = resource.controls; sysShapeListCtrl.loadPage(1); const state = useReactive(() => ({ basicComps() { return [ "Line", "Arc", "Curve", "Ellipse", "Triangle", "Rectage", "PolygonNormal", "Polygon", ].map((key) => compUICtrl.state.components.get(key) as any); }, })); return () => { const dataSource = sysShapeListCtrl.state.list; return (
默认
{ return state.basicComps[index].compKey; }} > {state.basicComps.map((item) => { return (
editor.actions.clickCompToDesign( item.compKey as ICompKeys ) } >
); })}
组合
{dataSource.length == 0 ? ( ) : ( )}
); }; }, });