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
d78a13e2
Commit
d78a13e2
authored
Aug 02, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI: 动画样式优化
parent
e72d8822
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
64 deletions
+19
-64
index.module.css
...onents/CommonComponents/FullScreenDrawer/index.module.css
+8
-53
index.tsx
src/components/CommonComponents/FullScreenDrawer/index.tsx
+10
-10
index.tsx
src/views/Project/ProjectData/SeeDataset/index.tsx
+1
-1
No files found.
src/components/CommonComponents/FullScreenDrawer/index.module.css
View file @
d78a13e2
...
...
@@ -8,13 +8,10 @@
z-index
:
100
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
animation
:
showBG
0.31s
ease
;
-webkit-animation
:
showBG
0.31s
ease
;
}
.drawerBoxHidden
{
animation
:
hiddenBG
0.31s
ease
;
-webkit-animation
:
hiddenBG
0.31s
ease
;
}
.closeBox
{
display
:
flex
;
justify-content
:
flex-end
;
...
...
@@ -23,13 +20,6 @@
position
:
fixed
;
top
:
0
;
left
:
0
;
align-items
:
center
;
animation
:
showClose
0.31s
ease
;
-webkit-animation
:
showClose
0.31s
ease
;
}
.closeBoxHidden
{
animation
:
hiddenClose
0.31s
ease
;
-webkit-animation
:
hiddenClose
0.31s
ease
;
}
.closeiIcon
{
position
:
absolute
;
...
...
@@ -44,17 +34,14 @@
position
:
fixed
;
top
:
40px
;
left
:
0
;
right
:
0
;
background-color
:
#fff
;
border-radius
:
16px
0
0
0
;
/* padding: 24px 32px; */
box-sizing
:
border-box
;
overflow
:
scroll
;
animation
:
showDrawer
0.31s
ease
;
-webkit-animation
:
showDrawer
0.31s
ease
;
}
.contentBoxHidden
{
animation
:
hiddenDrawer
0.31s
ease
;
-webkit-animation
:
hiddenDrawer
0.31s
ease
;
margin
:
0
auto
;
}
@keyframes
showBG
{
...
...
@@ -66,47 +53,15 @@
}
}
@keyframes
hiddenBG
{
from
{
background-color
:
rgba
(
0
,
0
,
0
,
0.78
);
}
to
{
background-color
:
rgba
(
0
,
0
,
0
,
0
);
}
}
@keyframes
showClose
{
from
{
top
:
calc
(
100%
-
40px
);
}
to
{
top
:
0px
;
}
}
@keyframes
hiddenClose
{
from
{
top
:
0px
;
}
to
{
top
:
calc
(
100%
-
40px
);
}
}
@keyframes
showDrawer
{
from
{
top
:
100%
;
top
:
160px
;
width
:
calc
(
100vw
-
28px
);
opacity
:
0
;
}
to
{
top
:
40px
;
}
}
@keyframes
hiddenDrawer
{
from
{
top
:
40px
;
}
to
{
top
:
100%
;
width
:
100vw
;
opacity
:
1
;
}
}
src/components/CommonComponents/FullScreenDrawer/index.tsx
View file @
d78a13e2
// 从下往上弹的全屏抽屉
import
{
useState
}
from
"react"
;
//
import { useState } from "react";
import
style
from
"./index.module.css"
;
import
classNames
from
"classnames"
;
import
CloseOutlinedIcon
from
"@mui/icons-material/CloseOutlined"
;
...
...
@@ -11,26 +11,26 @@ type IFullScreenDrawerProps = {
const
FullScreenDrawer
=
(
props
:
IFullScreenDrawerProps
)
=>
{
const
{
children
,
handleClose
}
=
props
;
const
[
closeing
,
setCloseing
]
=
useState
(
false
);
//
const [closeing, setCloseing] = useState(false);
const
handleReadyToClose
=
()
=>
{
setCloseing
(
true
);
setTimeout
(()
=>
{
setCloseing
(
false
);
handleClose
();
},
300
);
//
setCloseing(true);
// setCloseing(false);
handleClose
(
);
// setTimeout(() => {
//
}, 300);
};
return
(
<
div
className=
{
classNames
({
[
style
.
drawerBox
]:
true
,
[
style
.
drawerBoxHidden
]:
closeing
,
//
[style.drawerBoxHidden]: closeing,
})
}
>
<
div
className=
{
classNames
({
[
style
.
closeBox
]:
true
,
[
style
.
closeBoxHidden
]:
closeing
,
//
[style.closeBoxHidden]: closeing,
})
}
>
<
CloseOutlinedIcon
...
...
@@ -41,7 +41,7 @@ const FullScreenDrawer = (props: IFullScreenDrawerProps) => {
<
div
className=
{
classNames
({
[
style
.
contentBox
]:
true
,
[
style
.
contentBoxHidden
]:
closeing
,
//
[style.contentBoxHidden]: closeing,
})
}
>
{
children
}
...
...
src/views/Project/ProjectData/SeeDataset/index.tsx
View file @
d78a13e2
...
...
@@ -53,7 +53,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
useEffect
(()
=>
{
setTimeout
(()
=>
{
setShowAnimation
(
false
);
},
10
00
);
},
3
00
);
},
[]);
const
isCadd
=
useMemo
(()
=>
{
...
...
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