File tree Expand file tree Collapse file tree 8 files changed +15
-2
lines changed
docs/xflow/demo/log/runNode Expand file tree Collapse file tree 8 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export default () => {
26
26
type : 'icon-model' ,
27
27
bgColor : '#6172F3' ,
28
28
} ,
29
+ gradientHeight : '100%' ,
29
30
settingSchema : {
30
31
type : 'object' ,
31
32
properties : {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @xrenders/xflow" ,
3
- "version" : " 1.0.8-beta.6 " ,
3
+ "version" : " 1.0.8-beta.9 " ,
4
4
"description" : " 一款功能强大、易用灵活的流程编辑器框架,帮助你轻松构建复杂的工作流和流程产品" ,
5
5
"keywords" : [
6
6
" xflow"
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export default memo((props: any) => {
22
22
isSwitchBottom,
23
23
nodeSettingTitle,
24
24
style,
25
+ gradientHeight : _gradientHeight ,
25
26
} = props ;
26
27
const IconBox = useMemo ( ( ) => createIconFont ( iconFontUrl ) , [ iconFontUrl ] ) ;
27
28
const containerRef = React . useRef < HTMLDivElement > ( null ) ;
@@ -60,7 +61,8 @@ export default memo((props: any) => {
60
61
61
62
const hasBody = ! ! children ;
62
63
const hasDesc = ! ! desc && ! hideDesc ;
63
- const gradientHeight = hasBody || hasDesc || NodeWidget ? '20%' : '100%' ;
64
+ const gradientHeight = _gradientHeight || ( hasBody || hasDesc || NodeWidget ? '20%' : '100%' ) ;
65
+ debugger ;
64
66
65
67
return (
66
68
< div
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export default memo((props: any) => {
9
9
const nodeSetting = settingMap [ type ] || { } ;
10
10
const NodeWidget = widgets [ nodeSetting ?. nodeWidget ] || undefined ;
11
11
const nodeDescription = nodeSetting ?. description || '' ;
12
+ const gradientHeight = nodeSetting ?. gradientHeight ;
12
13
13
14
const hideDesc = nodeSetting ?. nodePanel ?. hideDesc ?? globalConfig ?. nodePanel ?. hideDesc ?? false ;
14
15
const hideTitleTips = globalConfig ?. nodeView ?. hideTitleTips ?? false ;
@@ -32,6 +33,7 @@ export default memo((props: any) => {
32
33
iconSvg = { SVGWidget ? < SVGWidget setting = { nodeSetting } /> : false }
33
34
hideTitleTips = { hideTitleTips }
34
35
nodeSettingTitle = { nodeSetting . title }
36
+ gradientHeight = { gradientHeight }
35
37
style = { { ...getColorfulModeBackground ( nodeSetting ?. icon ?. bgColor , openColorfulMode ) } }
36
38
/>
37
39
) ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export default memo((props: any) => {
10
10
const NodeWidget = widgets [ nodeSetting ?. nodeWidget ] || undefined ;
11
11
const nodeDescription = nodeSetting ?. description || '' ;
12
12
const hideDesc = nodeSetting ?. nodePanel ?. hideDesc ?? globalConfig ?. nodePanel ?. hideDesc ?? false ;
13
+ const gradientHeight = nodeSetting ?. gradientHeight ;
13
14
const hideTitleTips = globalConfig ?. nodeView ?. hideTitleTips ?? false ;
14
15
const SVGWidget = widgets [ nodeSetting ?. iconSvg ] ; // 自定义面板配置组件
15
16
@@ -31,6 +32,7 @@ export default memo((props: any) => {
31
32
iconSvg = { SVGWidget ? < SVGWidget setting = { nodeSetting } /> : false }
32
33
hideTitleTips = { hideTitleTips }
33
34
nodeSettingTitle = { nodeSetting . title || '结束' }
35
+ gradientHeight = { gradientHeight }
34
36
style = { { ...getColorfulModeBackground ( nodeSetting ?. icon ?. bgColor , openColorfulMode ) } }
35
37
/>
36
38
) ;
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export default memo((props: any) => {
22
22
const nodeSetting = settingMap [ type ] || { } ;
23
23
const NodeWidget = widgets [ nodeSetting ?. nodeWidget ] || undefined ;
24
24
const nodeDescription = nodeSetting ?. description || '' ;
25
+ const gradientHeight = nodeSetting ?. gradientHeight ;
25
26
const hideDesc =
26
27
nodeSetting ?. nodePanel ?. hideDesc ??
27
28
globalConfig ?. nodePanel ?. hideDesc ??
@@ -45,6 +46,7 @@ export default memo((props: any) => {
45
46
hideDesc = { hideDesc }
46
47
desc = { data ?. desc }
47
48
iconFontUrl = { iconFontUrl }
49
+ gradientHeight = { gradientHeight }
48
50
NodeWidget = {
49
51
< ParallelBuildInNodeWidget
50
52
data = { data }
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export default memo((props: any) => {
9
9
useContext ( ConfigContext ) ;
10
10
const nodeSetting = settingMap [ type ] || { } ;
11
11
const NodeWidget = widgets [ nodeSetting ?. nodeWidget ] || undefined ;
12
+ const gradientHeight = nodeSetting ?. gradientHeight ;
12
13
const nodeDescription = nodeSetting ?. description || '' ;
13
14
const hideDesc =
14
15
nodeSetting ?. nodePanel ?. hideDesc ??
@@ -35,6 +36,7 @@ export default memo((props: any) => {
35
36
iconSvg = { SVGWidget ? < SVGWidget setting = { nodeSetting } /> : false }
36
37
hideTitleTips = { hideTitleTips }
37
38
nodeSettingTitle = { nodeSetting ?. title || '开始' }
39
+ gradientHeight = { gradientHeight }
38
40
style = { { ...getColorfulModeBackground ( nodeSetting ?. icon ?. bgColor , openColorfulMode ) } }
39
41
/>
40
42
) ;
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ export default memo((props: any) => {
25
25
const nodeSetting = settingMap [ type ] || { } ;
26
26
const NodeWidget = widgets [ nodeSetting ?. nodeWidget ] || undefined ;
27
27
const nodeDescription = nodeSetting ?. description || '' ;
28
+ const gradientHeight = nodeSetting ?. gradientHeight ;
28
29
const hideDesc =
29
30
nodeSetting ?. nodePanel ?. hideDesc ??
30
31
globalConfig ?. nodePanel ?. hideDesc ??
@@ -69,6 +70,7 @@ export default memo((props: any) => {
69
70
hideTitleTips = { hideTitleTips }
70
71
isSwitchBottom = { isSwitchBottom }
71
72
nodeSettingTitle = { nodeSetting ?. title || 'Switch' }
73
+ gradientHeight = { gradientHeight }
72
74
style = { { ...getColorfulModeBackground ( nodeSetting ?. icon ?. bgColor , openColorfulMode ) } }
73
75
/>
74
76
) ;
You can’t perform that action at this time.
0 commit comments