mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-13 20:36:34 +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 { name: resourceName, type: resourceType } = d;
|
||||||
const {
|
const {
|
||||||
description,
|
description,
|
||||||
|
editorViews,
|
||||||
} = d.resourceTypeModel({} as any, {});
|
} = d.resourceTypeModel({} as any, {});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
resourceName,
|
resourceName,
|
||||||
resourceType,
|
resourceType,
|
||||||
description,
|
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';
|
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;
|
editorWindow: IEditorWindow;
|
||||||
|
|
||||||
viewName: string;
|
viewName: string;
|
||||||
|
|
||||||
|
viewType: 'editor' | 'webview';
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Context extends BasicContext implements IViewContext {
|
export class Context extends BasicContext implements IViewContext {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user