fix: 工作流基础节点宽度加宽

This commit is contained in:
shaohuzhang1 2024-09-26 13:51:51 +08:00 committed by shaohuzhang1
parent 5a986877d0
commit f931cc7f49
3 changed files with 14 additions and 3 deletions

View File

@ -9,7 +9,6 @@
"config": { "config": {
}, },
"width": 502,
"height": 825.6, "height": 825.6,
"stepName": "基本信息", "stepName": "基本信息",
"node_data": { "node_data": {

View File

@ -190,8 +190,11 @@ class AppNodeModel extends HtmlResize.model {
edge.updatePathByAnchor() edge.updatePathByAnchor()
}) })
} }
get_width() {
return this.properties?.width || 340
}
setAttributes() { setAttributes() {
this.width = this.properties?.width || 340 this.width = this.get_width()
const circleOnlyAsTarget = { const circleOnlyAsTarget = {
message: '只允许从右边的锚点连出', message: '只允许从右边的锚点连出',

View File

@ -6,8 +6,17 @@ class BaseNode extends AppNode {
super(props, BaseNodeVue) super(props, BaseNodeVue)
} }
} }
class BaseModel extends AppNodeModel {
constructor(data: any, graphModel: any) {
super(data, graphModel)
}
get_width() {
return 600
}
}
export default { export default {
type: 'base-node', type: 'base-node',
model: AppNodeModel, model: BaseModel,
view: BaseNode view: BaseNode
} }