fix: Workbench should receive the original skeleton other than shell skeleton

This commit is contained in:
LeoYuan 袁力皓 2022-03-11 11:21:08 +08:00
parent f0b79a0209
commit d5c3ca1068
3 changed files with 17 additions and 16 deletions

View File

@ -48,7 +48,7 @@ const plugins = new LowCodePluginManager(editor).toProxy();
editor.set('plugins' as any, plugins);
const { project: innerProject } = designer;
const skeletonCabin = getSkeletonCabin();
const skeletonCabin = getSkeletonCabin(innerSkeleton);
const { Workbench } = skeletonCabin;
const hotkey = new Hotkey();

View File

@ -1,15 +0,0 @@
import {
createSettingFieldView,
PopupContext,
PopupPipe,
Workbench,
} from '@alilc/lowcode-editor-skeleton';
export default function getSkeletonCabin() {
return {
createSettingFieldView,
PopupContext,
PopupPipe,
Workbench,
};
}

View File

@ -0,0 +1,16 @@
import {
Skeleton as InnerSkeleton,
createSettingFieldView,
PopupContext,
PopupPipe,
Workbench as InnerWorkbench,
} from '@alilc/lowcode-editor-skeleton';
export default function getSkeletonCabin(skeleton: InnerSkeleton) {
return {
createSettingFieldView,
PopupContext,
PopupPipe,
Workbench: (props: any) => <InnerWorkbench {...props} skeleton={skeleton} />, // hijack skeleton
};
}