forked from alibaba/lowcode-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin-instance.ts
More file actions
31 lines (24 loc) · 819 Bytes
/
plugin-instance.ts
File metadata and controls
31 lines (24 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { ILowCodePluginRuntime } from '@alilc/lowcode-designer';
import { IPublicModelPluginInstance } from '@alilc/lowcode-types';
import { pluginInstanceSymbol } from '../symbols';
export class PluginInstance implements IPublicModelPluginInstance {
private readonly [pluginInstanceSymbol]: ILowCodePluginRuntime;
constructor(pluginInstance: ILowCodePluginRuntime) {
this[pluginInstanceSymbol] = pluginInstance;
}
get pluginName(): string {
return this[pluginInstanceSymbol].name;
}
get dep(): string[] {
return this[pluginInstanceSymbol].dep;
}
get disabled(): boolean {
return this[pluginInstanceSymbol].disabled;
}
set disabled(disabled: boolean) {
this[pluginInstanceSymbol].setDisabled(disabled);
}
get meta() {
return this[pluginInstanceSymbol].meta;
}
}