refactor: pipeline edit view

This commit is contained in:
xiaojunnuo
2022-10-26 23:29:10 +08:00
parent 370a28c10e
commit e1466737e3
20 changed files with 89 additions and 94 deletions
+3 -3
View File
@@ -22,7 +22,6 @@ export type Storage = {
export type TaskOutputDefine = {
title: string;
key: string;
value?: any;
storage?: Storage;
};
@@ -38,6 +37,7 @@ export type PluginDefine = Registrable & {
};
export interface TaskPlugin {
getDefine(): PluginDefine;
execute(input: TaskInput): Promise<TaskOutput>;
}
@@ -50,9 +50,9 @@ export type OutputVO = {
export function IsTask(define: (() => PluginDefine) | PluginDefine) {
return function (target: any) {
if (define instanceof Function) {
target.define = define();
target.prototype.define = define();
} else {
target.define = define;
target.prototype.define = define;
}
pluginRegistry.install(target);