diff --git a/apps/application/flow/default_workflow.json b/apps/application/flow/default_workflow.json index a66a8c348..48ac23c4d 100644 --- a/apps/application/flow/default_workflow.json +++ b/apps/application/flow/default_workflow.json @@ -9,7 +9,6 @@ "config": { }, - "width": 502, "height": 825.6, "stepName": "基本信息", "node_data": { diff --git a/ui/src/workflow/common/app-node.ts b/ui/src/workflow/common/app-node.ts index 46bbf9e56..b84093816 100644 --- a/ui/src/workflow/common/app-node.ts +++ b/ui/src/workflow/common/app-node.ts @@ -190,8 +190,11 @@ class AppNodeModel extends HtmlResize.model { edge.updatePathByAnchor() }) } + get_width() { + return this.properties?.width || 340 + } setAttributes() { - this.width = this.properties?.width || 340 + this.width = this.get_width() const circleOnlyAsTarget = { message: '只允许从右边的锚点连出', diff --git a/ui/src/workflow/nodes/base-node/index.ts b/ui/src/workflow/nodes/base-node/index.ts index bec7e8d2b..69ede8e06 100644 --- a/ui/src/workflow/nodes/base-node/index.ts +++ b/ui/src/workflow/nodes/base-node/index.ts @@ -6,8 +6,17 @@ class BaseNode extends AppNode { super(props, BaseNodeVue) } } + +class BaseModel extends AppNodeModel { + constructor(data: any, graphModel: any) { + super(data, graphModel) + } + get_width() { + return 600 + } +} export default { type: 'base-node', - model: AppNodeModel, + model: BaseModel, view: BaseNode }