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
1bcde7bb
Commit
1bcde7bb
authored
Oct 28, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 解决工作流算子列表的mymenu组件的冒泡bug
parent
6a121979
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
26 deletions
+31
-26
index.module.css
...WorkflowOperator/components/OperatorCard/index.module.css
+0
-2
index.tsx
...ources/WorkflowOperator/components/OperatorCard/index.tsx
+23
-17
index.module.css
...rceCenter/UserResources/WorkflowOperator/index.module.css
+1
-3
index.tsx
...s/ResourceCenter/UserResources/WorkflowOperator/index.tsx
+7
-4
No files found.
src/views/ResourceCenter/UserResources/WorkflowOperator/components/OperatorCard/index.module.css
View file @
1bcde7bb
.itemBox
{
.itemBox
{
width
:
334px
;
height
:
108px
;
height
:
108px
;
padding
:
20px
;
padding
:
20px
;
margin
:
0
20px
20px
0
;
cursor
:
pointer
;
cursor
:
pointer
;
background
:
linear-gradient
(
180deg
,
#f5f7fa
0%
,
#ffffff
100%
);
background
:
linear-gradient
(
180deg
,
#f5f7fa
0%
,
#ffffff
100%
);
box-shadow
:
0px
3px
12px
0px
rgba
(
3
,
47
,
105
,
0.09
);
box-shadow
:
0px
3px
12px
0px
rgba
(
3
,
47
,
105
,
0.09
);
...
...
src/views/ResourceCenter/UserResources/WorkflowOperator/components/OperatorCard/index.tsx
View file @
1bcde7bb
...
@@ -52,6 +52,10 @@ const OperatorCard = observer((props: IProps) => {
...
@@ -52,6 +52,10 @@ const OperatorCard = observer((props: IProps) => {
});
});
};
};
const
handleMenuBox
=
(
event
:
any
)
=>
{
event
.
stopPropagation
();
};
return
(
return
(
<
div
className=
{
styles
.
itemBox
}
onClick=
{
handleToSeeOperator
}
>
<
div
className=
{
styles
.
itemBox
}
onClick=
{
handleToSeeOperator
}
>
<
div
className=
{
styles
.
itemHeaderBox
}
>
<
div
className=
{
styles
.
itemHeaderBox
}
>
...
@@ -62,23 +66,25 @@ const OperatorCard = observer((props: IProps) => {
...
@@ -62,23 +66,25 @@ const OperatorCard = observer((props: IProps) => {
{
operatorType
[
type
]
||
""
}
{
operatorType
[
type
]
||
""
}
</
span
>
</
span
>
</
div
>
</
div
>
<
MyMenu
<
div
className=
{
styles
.
menuBox
}
onClick=
{
(
e
)
=>
handleMenuBox
(
e
)
}
>
value=
""
<
MyMenu
options=
{
[{
label
:
"升级"
,
value
:
"upgrade"
}]
}
value=
""
hasTriangle=
{
false
}
options=
{
[{
label
:
"升级"
,
value
:
"upgrade"
}]
}
setValue=
{
onClickOperation
}
hasTriangle=
{
false
}
sx=
{
{
setValue=
{
onClickOperation
}
zIndex
:
1601
,
sx=
{
{
}
}
zIndex
:
1601
,
>
}
}
<
span
className=
{
styles
.
operationBox
}
>
>
<
img
<
span
className=
{
styles
.
operationBox
}
>
style=
{
{
width
:
16
,
height
:
16
}
}
<
img
src=
{
expandOperationSvg
}
style=
{
{
width
:
16
,
height
:
16
}
}
alt=
""
src=
{
expandOperationSvg
}
/>
alt=
""
</
span
>
/>
</
MyMenu
>
</
span
>
</
MyMenu
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
itemContentBox
}
>
<
div
className=
{
styles
.
itemContentBox
}
>
<
p
className=
{
styles
.
infoBox
}
>
<
p
className=
{
styles
.
infoBox
}
>
...
...
src/views/ResourceCenter/UserResources/WorkflowOperator/index.module.css
View file @
1bcde7bb
...
@@ -14,7 +14,5 @@
...
@@ -14,7 +14,5 @@
}
}
.contentBox
{
.contentBox
{
display
:
flex
;
padding
:
0
20px
24px
;
flex-wrap
:
wrap
;
padding-left
:
20px
;
}
}
src/views/ResourceCenter/UserResources/WorkflowOperator/index.tsx
View file @
1bcde7bb
...
@@ -17,6 +17,7 @@ import MySelect from "@/components/mui/MySelect";
...
@@ -17,6 +17,7 @@ import MySelect from "@/components/mui/MySelect";
import
MyButton
from
"@/components/mui/MyButton"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
OperatorCard
from
"./components/OperatorCard"
;
import
OperatorCard
from
"./components/OperatorCard"
;
import
AddOperator
from
"./components/AddOperator"
;
import
AddOperator
from
"./components/AddOperator"
;
import
CardTable
from
"@/components/CommonComponents/CardTable"
;
import
{
useStores
}
from
"@/store"
;
import
{
useStores
}
from
"@/store"
;
import
{
getOperatorList
,
IOperatorListParams
}
from
"@/api/resourceCenter"
;
import
{
getOperatorList
,
IOperatorListParams
}
from
"@/api/resourceCenter"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
...
@@ -134,15 +135,17 @@ const WorkflowOperator = observer(() => {
...
@@ -134,15 +135,17 @@ const WorkflowOperator = observer(() => {
<
MyCircularProgress
loading=
{
loading
}
>
<
MyCircularProgress
loading=
{
loading
}
>
{
list
?.
length
?
(
{
list
?.
length
?
(
<
div
className=
{
styles
.
contentBox
}
>
<
div
className=
{
styles
.
contentBox
}
>
{
list
?.
map
((
item
)
=>
{
<
CardTable
return
(
data=
{
list
}
renderItem=
{
(
item
:
any
)
=>
(
<
OperatorCard
<
OperatorCard
setDetailsId=
{
setDetailsId
}
setDetailsId=
{
setDetailsId
}
operatorInfo=
{
item
}
operatorInfo=
{
item
}
setPageType=
{
setPageType
}
setPageType=
{
setPageType
}
/>
/>
);
)
}
})
}
itemMinWidth=
{
377
}
></
CardTable
>
</
div
>
</
div
>
)
:
(
)
:
(
<
div
style=
{
{
height
:
300
}
}
>
<
div
style=
{
{
height
:
300
}
}
>
...
...
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