Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bkunyun
Commits
09db589f
Commit
09db589f
authored
Jul 12, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 参数设置输入没有输入框
parent
d0c45cef
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
21 deletions
+37
-21
index.module.css
...WorkFlowEdit/components/ParameterSetting/index.module.css
+22
-11
index.tsx
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
+6
-1
util.ts
src/views/WorkFlowEdit/util.ts
+9
-9
No files found.
src/views/WorkFlowEdit/components/ParameterSetting/index.module.css
View file @
09db589f
...
@@ -93,6 +93,12 @@
...
@@ -93,6 +93,12 @@
.parameterBox
:last-child
{
.parameterBox
:last-child
{
margin-bottom
:
0
;
margin-bottom
:
0
;
}
}
.inOutParameterBox
{
margin-bottom
:
12px
;
}
.inOutParameterBox
:last-child
{
margin-bottom
:
0px
;
}
.inOutParameterTop
{
.inOutParameterTop
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
...
@@ -117,6 +123,12 @@
...
@@ -117,6 +123,12 @@
font-size
:
12px
;
font-size
:
12px
;
line-height
:
20px
;
line-height
:
20px
;
}
}
.inOutParameterHelperText
{
margin-top
:
6px
;
font-size
:
12px
;
line-height
:
20px
;
color
:
rgba
(
255
,
78
,
78
,
1
);
}
.noData
{
.noData
{
height
:
calc
(
100vh
-
140px
);
height
:
calc
(
100vh
-
140px
);
...
@@ -133,34 +145,33 @@
...
@@ -133,34 +145,33 @@
line-height
:
22px
;
line-height
:
22px
;
color
:
rgba
(
138
,
144
,
153
,
1
);
color
:
rgba
(
138
,
144
,
153
,
1
);
}
}
.paramsGroup
{
.paramsGroup
{
padding-bottom
:
24px
;
padding-bottom
:
24px
;
}
}
.parameter
{
.parameter
{
padding
:
16px
0
24px
;
padding
:
16px
0
24px
;
border-bottom
:
1px
solid
#
F0F2F
5
;
border-bottom
:
1px
solid
#
f0f2f
5
;
}
}
.parameter
:last-child
{
.parameter
:last-child
{
border-bottom
:
none
;
border-bottom
:
none
;
}
}
.parameterTop
{
.parameterTop
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
margin-bottom
:
16px
;
margin-bottom
:
16px
;
}
}
.parameterLeft
{
.parameterLeft
{
}
}
.parameterName
{
.parameterName
{
font-size
:
14px
;
font-size
:
14px
;
color
:
#1
E
2633
;
color
:
#1
e
2633
;
line-height
:
22px
;
line-height
:
22px
;
font-weight
:
600
;
font-weight
:
600
;
}
}
.parameterClassTypeName
{
.parameterClassTypeName
{
font-size
:
14px
;
font-size
:
14px
;
color
:
#8
A
9099
;
color
:
#8
a
9099
;
line-height
:
22px
;
line-height
:
22px
;
}
}
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
View file @
09db589f
...
@@ -693,7 +693,12 @@ const ParameterSetting = (props: IParameterSettingProps) => {
...
@@ -693,7 +693,12 @@ const ParameterSetting = (props: IParameterSettingProps) => {
></
MySwitch
>
></
MySwitch
>
</
div
>
</
div
>
</
div
>
</
div
>
{
renderInput
(
parameter
)
}
{
parameter
.
error
&&
parameter
.
helperText
&&
(
<
div
className=
{
styles
.
inOutParameterHelperText
}
>
{
parameter
.
helperText
}
</
div
>
)
}
{
/* {renderInput(parameter)} */
}
</
div
>
</
div
>
);
);
})
}
})
}
...
...
src/views/WorkFlowEdit/util.ts
View file @
09db589f
...
@@ -4,7 +4,7 @@ export const getCustomTemplateParameterCheckResult = (
...
@@ -4,7 +4,7 @@ export const getCustomTemplateParameterCheckResult = (
):
{
):
{
error
:
boolean
;
error
:
boolean
;
helperText
:
string
;
helperText
:
string
;
deleteLine
?:
boolean
;
//
自动将该线
删除
deleteLine
?:
boolean
;
//
该线是否要
删除
}
=>
{
}
=>
{
let
error
=
false
;
let
error
=
false
;
let
helperText
=
""
;
let
helperText
=
""
;
...
@@ -15,18 +15,18 @@ export const getCustomTemplateParameterCheckResult = (
...
@@ -15,18 +15,18 @@ export const getCustomTemplateParameterCheckResult = (
helperText
,
helperText
,
}
}
}
}
// 1. 当该输入为必填项时:
// 输入校验
// 1. 当该输入为必填项时:
// 1.1 若为“启用”状态,则表示该输入的值交由用户在使用时填写。故该输入的节点入口在右侧编辑区内不允许连线,若已有连线则自动将该线删除。
// 1.1 若为“启用”状态,则表示该输入的值交由用户在使用时填写。故该输入的节点入口在右侧编辑区内不允许连线,若已有连线则自动将该线删除。
// 1.2 若为“关闭”状态,则表示该输入的值是上一步批算子的结果。故该输入的节点入口在右侧编辑区内必须有连线。(若编辑者没有为该节点入口添加连线,则错误提示“该输入为必填,需在右侧视图编辑区连接输入文件或重新改回“开启”状态”;若连上线了则无需错误提示。)
// 1.2 若为“关闭”状态,则表示该输入的值是上一步批算子的结果。故该输入的节点入口在右侧编辑区内必须有连线。(若编辑者没有为该节点入口添加连线,则错误提示“该输入为必填,需在右侧视图编辑区连接输入文件或重新改回“开启”状态”;若连上线了则无需错误提示。)
// 2. 当该输入为选填项时:
// 2. 当该输入为选填项时:
// 2.1 若为“启用”状态,则表示该输入的值交由用户在使用时填写。故该输入的节点入口在右侧编辑区内不允许连线,若已有连线则自动将该线删除。
// 2.1 若为“启用”状态,则表示该输入的值交由用户在使用时填写。故该输入的节点入口在右侧编辑区内不允许连线,若已有连线则自动将该线删除。
// 2.2 若为“关闭”状态,则表示该输入的值是上一步批算子的结果,又因为其为选填项,所以这线可连可不连,不做限制。
// 2.2 若为“关闭”状态,则表示该输入的值是上一步批算子的结果,又因为其为选填项,所以这线可连可不连,不做限制。
// 输入校验
if
(
parameter
.
parameterGroup
===
"in"
)
{
if
(
parameter
.
parameterGroup
===
"in"
)
{
if
(
parameter
.
required
)
{
if
(
parameter
.
required
)
{
if
(
!
parameter
.
hidden
&&
parameter
.
isLine
)
{
if
(
!
parameter
.
hidden
&&
parameter
.
isLine
)
{
...
@@ -50,7 +50,7 @@ export const getCustomTemplateParameterCheckResult = (
...
@@ -50,7 +50,7 @@ export const getCustomTemplateParameterCheckResult = (
}
else
if
(
parameter
.
hidden
&&
!
parameter
.
isLine
)
{
}
else
if
(
parameter
.
hidden
&&
!
parameter
.
isLine
)
{
return
{
return
{
error
:
true
,
error
:
true
,
helperText
:
'该输入为必填,需在右侧视图编辑区连接输入文件或重新改回“开启”状态
”
'
,
helperText
:
'该输入为必填,需在右侧视图编辑区连接输入文件或重新改回“开启”状态'
,
deleteLine
:
false
,
deleteLine
:
false
,
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment