mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 19:52:51 +00:00
feat(workspace): add editorViews to resourceTypeList api
This commit is contained in:
parent
16f5ee71e4
commit
c838dc70eb
@ -39,12 +39,19 @@ export class Workspace implements IPublicApiWorkspace {
|
||||
const { name: resourceName, type: resourceType } = d;
|
||||
const {
|
||||
description,
|
||||
editorViews,
|
||||
} = d.resourceTypeModel({} as any, {});
|
||||
|
||||
return {
|
||||
resourceName,
|
||||
resourceType,
|
||||
description,
|
||||
editorViews: editorViews.map(d => (
|
||||
{
|
||||
viewName: d.viewName,
|
||||
viewType: d.viewType || 'editor',
|
||||
}
|
||||
)),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
@ -24,4 +24,12 @@ export class EditorView {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
get viewName() {
|
||||
return this[editorViewSymbol].viewName;
|
||||
}
|
||||
|
||||
get viewType() {
|
||||
return this[editorViewSymbol].viewType;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
import { IPublicModelPluginContext } from './plugin-context';
|
||||
|
||||
export interface IPublicModelEditorView extends IPublicModelPluginContext {}
|
||||
export interface IPublicModelEditorView extends IPublicModelPluginContext {
|
||||
viewName: string;
|
||||
|
||||
viewType: 'editor' | 'webview';
|
||||
}
|
||||
@ -10,6 +10,8 @@ export interface IViewContext extends IBasicContext {
|
||||
editorWindow: IEditorWindow;
|
||||
|
||||
viewName: string;
|
||||
|
||||
viewType: 'editor' | 'webview';
|
||||
}
|
||||
|
||||
export class Context extends BasicContext implements IViewContext {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user