File tree Expand file tree Collapse file tree 3 files changed +21
-13
lines changed
Expand file tree Collapse file tree 3 files changed +21
-13
lines changed Original file line number Diff line number Diff line change 2626 <h4 v-else >{{ nodeModel.properties.stepName }}</h4 >
2727 </div >
2828
29- <div
30- @mousemove.stop
31- @mousedown.stop
32- @keydown.stop
33- @click.stop
34- v-if =" showOperate(nodeModel.type)"
35- >
29+ <div @mousemove.stop @mousedown.stop @keydown.stop @click.stop >
3630 <el-button text @click =" showNode = !showNode" class =" mr-4" >
3731 <el-icon class =" arrow-icon" :class =" showNode ? 'rotate-180' : ''"
3832 ><ArrowDownBold />
3933 </el-icon >
4034 </el-button >
41- <el-dropdown :teleported =" false" trigger =" click" >
35+ <el-dropdown v-if = " showOperate(nodeModel.type) " :teleported =" false" trigger =" click" >
4236 <el-button text >
4337 <el-icon class =" color-secondary" ><MoreFilled /></el-icon >
4438 </el-button >
@@ -130,7 +124,19 @@ const height = ref<{
130124})
131125const showAnchor = ref <boolean >(false )
132126const anchorData = ref <any >()
133- const showNode = ref <boolean >(true )
127+ // const showNode = ref<boolean>(true)
128+ const showNode = computed ({
129+ set : (v ) => {
130+ set (props .nodeModel .properties , ' showNode' , v )
131+ },
132+ get : () => {
133+ if (props .nodeModel .properties .showNode !== undefined ) {
134+ return props .nodeModel .properties .showNode
135+ }
136+ set (props .nodeModel .properties , ' showNode' , true )
137+ return true
138+ }
139+ })
134140const node_status = computed (() => {
135141 if (props .nodeModel .properties .status ) {
136142 return props .nodeModel .properties .status
Original file line number Diff line number Diff line change @@ -234,21 +234,22 @@ class AppNodeModel extends HtmlResize.model {
234234 }
235235 getDefaultAnchor ( ) {
236236 const { id, x, y, width } = this
237+ const showNode = this . properties . showNode === undefined ? true : this . properties . showNode
237238 const anchors : any = [ ]
238239
239240 if ( this . type !== WorkflowType . Base ) {
240241 if ( this . type !== WorkflowType . Start ) {
241242 anchors . push ( {
242243 x : x - width / 2 + 10 ,
243- y : y ,
244+ y : showNode ? y : y - 15 ,
244245 id : `${ id } _left` ,
245246 edgeAddable : false ,
246247 type : 'left'
247248 } )
248249 }
249250 anchors . push ( {
250251 x : x + width / 2 - 10 ,
251- y : y ,
252+ y : showNode ? y : y - 15 ,
252253 id : `${ id } _right` ,
253254 type : 'right'
254255 } )
Original file line number Diff line number Diff line change @@ -35,10 +35,11 @@ class ConditionModel extends AppNodeModel {
3535 if ( this . height === undefined ) {
3636 this . height = 200
3737 }
38+ const showNode = this . properties . showNode === undefined ? true : this . properties . showNode
3839 const anchors : any = [ ]
3940 anchors . push ( {
4041 x : x - width / 2 + 10 ,
41- y : y ,
42+ y : showNode ? y : y - 15 ,
4243 id : `${ id } _left` ,
4344 edgeAddable : false ,
4445 type : 'left'
@@ -50,7 +51,7 @@ class ConditionModel extends AppNodeModel {
5051 const h = get_up_index_height ( branch_condition_list , index )
5152 anchors . push ( {
5253 x : x + width / 2 - 10 ,
53- y : y - height / 2 + 75 + h + element . height / 2 ,
54+ y : showNode ? y - height / 2 + 75 + h + element . height / 2 : y - 15 ,
5455 id : `${ id } _${ element . id } _right` ,
5556 type : 'right'
5657 } )
You can’t perform that action at this time.
0 commit comments