|
@@ -5,6 +5,7 @@ import { Container, Draggable } from "vue-dndrop";
|
|
|
import { useEditor } from "../../..";
|
|
|
import { HotKeyCtrl } from "../../../controllers/HotKeyCtrl";
|
|
|
import Canvas from "../../Canvas";
|
|
|
+import ErrorComp from "../../CompUI/placeHoder";
|
|
|
|
|
|
export default defineUI({
|
|
|
setup() {
|
|
@@ -26,12 +27,12 @@ export default defineUI({
|
|
|
non-drag-area-selector={".drag-disable"}
|
|
|
>
|
|
|
{store.designData.content.map((d) => {
|
|
|
- const Comp: any = config.compUI[d.compKey]?.Component;
|
|
|
- return Comp ? (
|
|
|
+ const Comp: any = config.compUI[d.compKey]?.Component || ErrorComp;
|
|
|
+ return (
|
|
|
<Draggable key={d.id}>
|
|
|
<Comp compId={d.id} />
|
|
|
</Draggable>
|
|
|
- ) : undefined;
|
|
|
+ );
|
|
|
})}
|
|
|
</Container>
|
|
|
) : (
|