mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-13 12:13:10 +00:00
merge 331
This commit is contained in:
commit
3e5a900ad5
@ -1,21 +1,20 @@
|
||||
import undoRedo from '@ali/lowcode-plugin-undo-redo';
|
||||
import zhEn from '@ali/lowcode-plugin-zh-en';
|
||||
import logo from '@ali/lowcode-plugin-sample-logo';
|
||||
import SamplePreview from '@ali/lowcode-plugin-sample-preview';
|
||||
import Designer from '@ali/lowcode-plugin-designer';
|
||||
import SettingsPane from '@ali/lowcode-plugin-settings-pane';
|
||||
import samplePreview from '@ali/lowcode-plugin-sample-preview';
|
||||
import designer from '@ali/lowcode-plugin-designer';
|
||||
import settingsPane from '@ali/lowcode-plugin-settings-pane';
|
||||
import componentsPane from '@ali/lowcode-plugin-components-pane';
|
||||
import OutlinePane from '@ali/lowcode-plugin-outline-pane';
|
||||
import EventBindDialog from '@ali/lowcode-plugin-event-bind-dialog'
|
||||
import { PluginFactory } from '@ali/lowcode-editor-core';
|
||||
import outlinePane from '@ali/lowcode-plugin-outline-pane';
|
||||
import eventBindDialog from '@ali/lowcode-plugin-event-bind-dialog'
|
||||
export default {
|
||||
undoRedo: PluginFactory(undoRedo),
|
||||
zhEn: PluginFactory(zhEn),
|
||||
designer: PluginFactory(Designer),
|
||||
componentsPane: PluginFactory(componentsPane),
|
||||
settingsPane: PluginFactory(SettingsPane),
|
||||
outlinePane: PluginFactory(OutlinePane),
|
||||
eventBindDialog:PluginFactory(EventBindDialog),
|
||||
logo: PluginFactory(logo),
|
||||
samplePreview: PluginFactory(SamplePreview)
|
||||
undoRedo,
|
||||
zhEn,
|
||||
designer,
|
||||
componentsPane,
|
||||
settingsPane,
|
||||
outlinePane,
|
||||
eventBindDialog,
|
||||
logo,
|
||||
samplePreview
|
||||
};
|
||||
|
||||
@ -11,6 +11,8 @@ import {
|
||||
PluginSet,
|
||||
} from './definitions';
|
||||
|
||||
import pluginFactory from './pluginFactory';
|
||||
|
||||
import * as editorUtils from './utils';
|
||||
|
||||
const { registShortCuts, transformToPromise, unRegistShortCuts } = editorUtils;
|
||||
@ -92,7 +94,10 @@ export default class Editor extends EventEmitter {
|
||||
constructor(config: EditorConfig, components: PluginClassSet, utils?: Utils) {
|
||||
super();
|
||||
this.config = config;
|
||||
this.components = components;
|
||||
this.components = {};
|
||||
Object.entries(components).forEach(([key, value]): void => {
|
||||
this.components[key] = pluginFactory(value);
|
||||
});
|
||||
this.utils = { ...editorUtils, ...utils };
|
||||
instance = this;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user