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
e8ef7d31
Commit
e8ef7d31
authored
Aug 21, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加算子入口增加动画过渡效果
parent
52105c98
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
11 deletions
+27
-11
index.module.css
src/views/WorkFlowEdit/index.module.css
+16
-2
index.tsx
src/views/WorkFlowEdit/index.tsx
+11
-9
No files found.
src/views/WorkFlowEdit/index.module.css
View file @
e8ef7d31
...
@@ -45,14 +45,28 @@
...
@@ -45,14 +45,28 @@
bottom
:
20px
;
bottom
:
20px
;
width
:
36px
;
width
:
36px
;
height
:
36px
;
height
:
36px
;
border-radius
:
50%
;
border-radius
:
18px
;
box-shadow
:
0px
3px
10px
0px
rgba
(
0
,
24
,
57
,
0.14
);
box-shadow
:
0px
3px
10px
0px
rgba
(
0
,
24
,
57
,
0.14
);
font-size
:
30px
;
font-size
:
30px
;
line-height
:
36px
;
line-height
:
36px
;
text-align
:
center
;
text-align
:
start
;
color
:
RGBA
(
66
,
141
,
255
,
1
);
color
:
RGBA
(
66
,
141
,
255
,
1
);
cursor
:
pointer
;
cursor
:
pointer
;
background-color
:
#fff
;
background-color
:
#fff
;
transition
:
width
1s
;
-webkit-transition
:
width
1s
;
overflow
:
hidden
;
display
:
flex
;
justify-content
:
start
;
align-items
:
center
;
}
.addOperator
:hover
{
width
:
105px
;
}
.addText
{
font-size
:
14px
;
line-height
:
36px
;
white-space
:
nowrap
;
}
}
.swFlowBox
{
.swFlowBox
{
flex
:
1
;
flex
:
1
;
...
...
src/views/WorkFlowEdit/index.tsx
View file @
e8ef7d31
...
@@ -25,6 +25,7 @@ import { getCustomTemplateParameterCheckResult } from "./util";
...
@@ -25,6 +25,7 @@ import { getCustomTemplateParameterCheckResult } from "./util";
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
CustomOperator
from
"../CustomOperator"
;
import
CustomOperator
from
"../CustomOperator"
;
import
SaveCustomTemplate
from
"./components/SaveCustomTemplate"
;
import
SaveCustomTemplate
from
"./components/SaveCustomTemplate"
;
import
AddIcon
from
"@mui/icons-material/Add"
;
import
styles
from
"./index.module.css"
;
import
styles
from
"./index.module.css"
;
...
@@ -55,7 +56,7 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -55,7 +56,7 @@ const WorkFlowEdit = observer((props: IProps) => {
const
[
oldversion
,
setOldersion
]
=
useState
(
""
);
// 编辑是自定义模板的老版本
const
[
oldversion
,
setOldersion
]
=
useState
(
""
);
// 编辑是自定义模板的老版本
const
[
description
,
setDescription
]
=
useState
(
""
);
// 自定义模板描述
const
[
description
,
setDescription
]
=
useState
(
""
);
// 自定义模板描述
const
[
creator
,
setCreator
]
=
useState
(
""
);
// 自定义模板创建人
const
[
creator
,
setCreator
]
=
useState
(
""
);
// 自定义模板创建人
const
[
operatingArea
,
setOperatingArea
]
=
useState
<
'form'
|
'flow'
>
(
'form'
)
// 当前操作区域
const
[
operatingArea
,
setOperatingArea
]
=
useState
<
"form"
|
"flow"
>
(
"form"
);
// 当前操作区域
const
[
leftContentType
,
setLeftContentType
]
=
useState
(
"list"
);
// 页面左侧展示的是算子列表还是参数设置
const
[
leftContentType
,
setLeftContentType
]
=
useState
(
"list"
);
// 页面左侧展示的是算子列表还是参数设置
const
[
popperTitle
,
setPopperTitle
]
=
useState
(
const
[
popperTitle
,
setPopperTitle
]
=
useState
(
...
@@ -64,12 +65,12 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -64,12 +65,12 @@ const WorkFlowEdit = observer((props: IProps) => {
);
);
// 是否要监听删除时间
// 是否要监听删除时间
const
listenState
=
useMemo
(()
=>
{
const
listenState
=
useMemo
(()
=>
{
if
(
operatingArea
===
'form'
)
{
if
(
operatingArea
===
"form"
)
{
return
false
return
false
;
}
}
return
!
saveFormDialog
&&
!
showCustomOperator
return
!
saveFormDialog
&&
!
showCustomOperator
;
},
[
operatingArea
,
saveFormDialog
,
showCustomOperator
])
},
[
operatingArea
,
saveFormDialog
,
showCustomOperator
])
;
// 编辑时获取模板详情的方法
// 编辑时获取模板详情的方法
const
{
run
:
fetchTemplateConfigInfoRun
}
=
useMyRequest
(
const
{
run
:
fetchTemplateConfigInfoRun
}
=
useMyRequest
(
...
@@ -218,7 +219,7 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -218,7 +219,7 @@ const WorkFlowEdit = observer((props: IProps) => {
<
div
<
div
className=
{
styles
.
swFormBox
}
className=
{
styles
.
swFormBox
}
onClick=
{
()
=>
{
onClick=
{
()
=>
{
setOperatingArea
(
'form'
);
setOperatingArea
(
"form"
);
}
}
}
}
>
>
<
div
className=
{
styles
.
radiosBox
}
>
<
div
className=
{
styles
.
radiosBox
}
>
...
@@ -254,14 +255,15 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -254,14 +255,15 @@ const WorkFlowEdit = observer((props: IProps) => {
className=
{
styles
.
addOperator
}
className=
{
styles
.
addOperator
}
onClick=
{
()
=>
setShowCustomOperator
(
true
)
}
onClick=
{
()
=>
setShowCustomOperator
(
true
)
}
>
>
+
<
AddIcon
sx=
{
{
padding
:
"6px"
}
}
/>
<
span
className=
{
styles
.
addText
}
>
添加算子
</
span
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
<
div
className=
{
styles
.
swFlowBox
}
className=
{
styles
.
swFlowBox
}
id=
"workFlowEditRight"
id=
"workFlowEditRight"
onClick=
{
()
=>
{
onClick=
{
()
=>
{
setOperatingArea
(
'flow'
);
setOperatingArea
(
"flow"
);
}
}
}
}
>
>
<
Flow
<
Flow
...
...
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