File tree Expand file tree Collapse file tree 6 files changed +37
-23
lines changed
packages/x-flow/src/nodes Expand file tree Collapse file tree 6 files changed +37
-23
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import { useStore } from '../../hooks/useStore';
8
8
import { uuid } from '../../utils' ;
9
9
import './index.less' ;
10
10
11
-
12
11
export default memo ( ( props : any ) => {
13
12
const {
14
13
data,
@@ -38,13 +37,21 @@ export default memo((props: any) => {
38
37
39
38
const renderTitle = ( item , index ) => {
40
39
const defTitle = item ?. title || `事件${ index } ` ;
41
- const title = parallelExtra ?. titleKey
42
- ? item [ parallelExtra ?. titleKey ]
43
- : defTitle ;
40
+ // const title = parallelExtra?.titleKey
41
+ // ? item[parallelExtra?.titleKey]
42
+ // : defTitle;
43
+ const title = item [ parallelExtra ?. titleKey ] ?? defTitle ;
44
44
return (
45
45
< div className = "item-header" >
46
46
< div className = "item-title" >
47
- { title && < TextEllipsis text = { title } rows = { 1 } type = "paragraph" /> }
47
+ { title && (
48
+ < TextEllipsis
49
+ text = { title }
50
+ // rows={1}
51
+ // type="paragraph"
52
+ className = "item-content-in"
53
+ />
54
+ ) }
48
55
</ div >
49
56
< SourceHandle
50
57
position = { position }
@@ -73,9 +80,13 @@ export default memo((props: any) => {
73
80
{ CustomNodeWidget ? (
74
81
< CustomNodeWidget data = { item } index = { index } />
75
82
) : (
76
- < >
77
- { value && < TextEllipsis text = { value } rows = { 5 } type = "paragraph" /> }
78
- </ >
83
+ < div >
84
+ { value && (
85
+ < div className = "item-content-in" >
86
+ < TextEllipsis text = { value } rows = { 5 } type = "paragraph" />
87
+ </ div >
88
+ ) }
89
+ </ div >
79
90
) }
80
91
</ div >
81
92
) ;
Original file line number Diff line number Diff line change 43
43
}
44
44
45
45
.item-handle {
46
- right : -12px ;
46
+ right : -11px ;
47
+ top : 9px ;
48
+
49
+ .xflow-node-add-box {
50
+ right : 4px ;
51
+ }
47
52
}
48
53
}
49
54
67
72
68
73
.node-parallel-bottom-item {
69
74
width : 100px ;
75
+
70
76
.item-header {
71
77
.item-title {
72
78
text-align : center ;
77
83
margin-bottom : 0 ;
78
84
}
79
85
}
86
+
80
87
.item-handle {
81
- bottom : -4 px ;
88
+ top : 0 px ;
82
89
}
83
90
}
84
91
}
Original file line number Diff line number Diff line change @@ -12,14 +12,10 @@ interface INodeSwitchSettingPorps {
12
12
const schema : Schema = {
13
13
type : 'object' ,
14
14
displayType :'row' ,
15
- // span: 24,
16
15
properties : {
17
16
list : {
18
17
type : 'array' ,
19
18
widget : 'simpleList' ,
20
- // display: 'block',
21
- // min: 2,
22
- default :[ { } , { } ] ,
23
19
props : {
24
20
hideCopy : true ,
25
21
hideMove : true ,
Original file line number Diff line number Diff line change @@ -32,9 +32,10 @@ export default memo((props: any) => {
32
32
33
33
const renderTitle = ( item , index ) => {
34
34
const defTitle = item ?. title || `条件${ index } ` ;
35
- const title = switchExtra ?. titleKey
36
- ? item [ switchExtra ?. titleKey ]
37
- : defTitle ;
35
+ // const title = switchExtra?.titleKey
36
+ // ? item[switchExtra?.titleKey]
37
+ // : defTitle;
38
+ const title = item [ switchExtra ?. titleKey ] ?? defTitle ;
38
39
return (
39
40
< div className = "item-header" >
40
41
< div className = "item-title" > { title } </ div >
@@ -66,9 +67,9 @@ export default memo((props: any) => {
66
67
{ CustomNodeWidget ? (
67
68
< CustomNodeWidget data = { item } index = { index } />
68
69
) : (
69
- < >
70
- { value && < TextEllipsis text = { value } rows = { 5 } type = "paragraph" /> }
71
- </ >
70
+ < div >
71
+ { value && < div className = 'item-content-in' > < TextEllipsis text = { value } rows = { 5 } type = "paragraph" /> </ div > }
72
+ </ div >
72
73
) }
73
74
</ div >
74
75
) ;
Original file line number Diff line number Diff line change 34
34
.item-title {
35
35
text-align : right ;
36
36
font-weight : 600 ;
37
+ padding-right : 5px ;
37
38
}
38
39
39
40
.item-handle {
40
- right : -16 px ;
41
+ right : -12 px ;
41
42
}
42
43
}
43
44
Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ const schema: Schema = {
18
18
type : 'array' ,
19
19
widget : 'simpleList' ,
20
20
display : 'block' ,
21
- min : 1 ,
22
- default :[ { } ] ,
23
21
props : {
24
22
hideCopy : true ,
25
23
hideMove : true ,
You can’t perform that action at this time.
0 commit comments