mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-02-28 21:20:28 +00:00
fix: 去掉 AppHelper
This commit is contained in:
parent
114a279b59
commit
da9bb7f3b1
@ -1,13 +1,12 @@
|
||||
import logger from '@ali/vu-logger';
|
||||
import { EventEmitter } from 'events';
|
||||
import { editor } from './editor';
|
||||
import { AppHelper } from '@ali/lowcode-utils';
|
||||
|
||||
/**
|
||||
* Bus class as an EventEmitter
|
||||
*/
|
||||
export class Bus {
|
||||
private emitter = AppHelper.getInstance();
|
||||
private emitter = new EventEmitter();
|
||||
|
||||
getEmitter() {
|
||||
return this.emitter;
|
||||
|
||||
@ -13,7 +13,6 @@ import RightArea from './right-area';
|
||||
import './workbench.less';
|
||||
import { SkeletonContext } from '../context';
|
||||
import { EditorConfig, PluginClassSet } from '@ali/lowcode-types';
|
||||
import { AppHelper } from '@ali/lowcode-utils';
|
||||
|
||||
@observer
|
||||
export class Workbench extends Component<{ skeleton: Skeleton; config?: EditorConfig; components?: PluginClassSet; className?: string; topAreaItemClassName?: string }> {
|
||||
@ -27,10 +26,9 @@ export class Workbench extends Component<{ skeleton: Skeleton; config?: EditorCo
|
||||
return false;
|
||||
}
|
||||
|
||||
componentDidCatch(error: any) {
|
||||
const helper = AppHelper.getInstance();
|
||||
helper.emit('editor.skeleton.workbench.error', error);
|
||||
}
|
||||
// componentDidCatch(error: any) {
|
||||
// globalContext.get(Editor).emit('editor.skeleton.workbench.error', error);
|
||||
// }
|
||||
|
||||
render() {
|
||||
const { skeleton, className, topAreaItemClassName } = this.props;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user