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