Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
muChangApp
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
WitCloud
muChangApp
Commits
f683a72f
Commit
f683a72f
authored
Nov 05, 2019
by
zhuangzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改牛舍配置页: 风机,水槽,照明模式添加或替换
parent
afd6fef7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
342 additions
and
117 deletions
+342
-117
animations.ts
src/app/animations/animations.ts
+90
-0
env-cfg.page.html
src/app/envCtrl/env-cfg/env-cfg.page.html
+43
-42
env-cfg.page.ts
src/app/envCtrl/env-cfg/env-cfg.page.ts
+209
-75
No files found.
src/app/animations/animations.ts
0 → 100644
View file @
f683a72f
import
{
BrowserAnimationsModule
}
from
'@angular/platform-browser/animations'
;
import
{
trigger
,
state
,
style
,
transition
,
animate
,
keyframes
}
from
'@angular/animations'
;
// 动画时间线
const
time
=
'300ms'
;
const
styles
=
{
ease
:
time
+
' ease '
,
linear
:
time
+
' linear '
,
easeIn
:
time
+
' ease-in'
,
easeOut
:
time
+
' ease-out'
,
stepStart
:
time
+
' step-start'
,
stepEnd
:
time
+
' step-end'
,
easeInOut
:
time
+
' ease-in-out'
,
faseOutSlowIn
:
time
+
' cubic-bezier(0.4, 0, 0.2, 1)'
,
inOutBack
:
time
+
' cubic-bezier(0.68, -0.55, 0.27, 1.55)'
,
inOutCubic
:
time
+
' cubic-bezier(0.65, 0.05, 0.36, 1)'
,
inOutQuadratic
:
time
+
' cubic-bezier(0.46, 0.03, 0.52, 0.96)'
,
inOutSine
:
time
+
' cubic-bezier(0.45, 0.05, 0.55, 0.95)'
}
// 动画配置
const
opts
=
{
fadeIn
:
[
style
({
opacity
:
0
}),
animate
(
styles
.
inOutBack
,
style
({
opacity
:
1
})),
],
fadeOut
:
[
style
({
opacity
:
1
}),
animate
(
styles
.
inOutBack
,
style
({
opacity
:
0
}))
],
shrink
:
[
style
({
height
:
'*'
}),
animate
(
styles
.
easeOut
,
style
({
height
:
0
}))
],
stretch
:
[
style
({
height
:
'0'
}),
animate
(
styles
.
easeIn
,
style
({
height
:
'*'
}))
],
flyIn
:
[
style
({
transform
:
'translateY(-50%)'
,
zIndex
:
'-5'
}),
// translateX(-100%)
animate
(
styles
.
easeIn
,
style
({
transform
:
'translateY(0)'
}))
],
flyOut
:
[
style
({
zIndex
:
'-5'
}),
animate
(
styles
.
easeIn
,
style
({
transform
:
'translateY(-50%)'
}))
],
// flyIn: [
// style({ transform: 'translateX(-100%)' }), // translateX(-100%)
// animate(styles.inOutBack, style({ transform: '*' }))
// ],
// flyOut: [
// style({ transform: '*' }),
// animate(styles.inOutBack, style({ transform: 'translateX(-100%)' }))
// ],
zoomIn
:
[
style
({
transform
:
'scale(.5)'
}),
animate
(
styles
.
inOutBack
,
style
({
transform
:
'*'
}))
],
zoomOut
:
[
style
({
transform
:
'*'
}),
animate
(
styles
.
inOutBack
,
style
({
transform
:
'scale(.5)'
}))
]
}
// 导出动画时间线定义,供自定义动画的时候使用
export
const
animStyle
=
styles
// 导出动画
export
const
fadeIn
=
[
trigger
(
'fadeIn'
,
[
transition
(
'void => *'
,
opts
.
fadeIn
)])]
export
const
fadeOut
=
[
trigger
(
'fadeOut'
,
[
transition
(
'* => void'
,
opts
.
fadeOut
)])]
export
const
stretch
=
[
trigger
(
'stretch'
,
[
transition
(
'void => *'
,
opts
.
stretch
)])]
export
const
shrink
=
[
trigger
(
'shrink'
,
[
transition
(
'* => void'
,
opts
.
shrink
)])]
export
const
flyIn
=
[
trigger
(
'flyIn'
,
[
transition
(
'void => *'
,
opts
.
flyIn
)])]
export
const
flyOut
=
[
trigger
(
'flyOut'
,
[
transition
(
'* => void'
,
opts
.
flyOut
)])]
export
const
zoomIn
=
[
trigger
(
'zoomIn'
,
[
transition
(
'void => *'
,
opts
.
zoomIn
)])]
export
const
zoomOut
=
[
trigger
(
'zoomOut'
,
[
transition
(
'* => void'
,
opts
.
zoomOut
)])]
export
const
animations
=
[
trigger
(
'animations'
,
[
transition
(
'* => fadeIn'
,
opts
.
fadeIn
),
transition
(
'* => fadeIn'
,
opts
.
fadeOut
),
transition
(
'* => shrink'
,
opts
.
shrink
),
transition
(
'* => stretch'
,
opts
.
stretch
),
transition
(
'* => flyIn'
,
opts
.
flyIn
),
transition
(
'* => flyOut'
,
opts
.
flyOut
),
transition
(
'* => zoomIn'
,
opts
.
zoomIn
),
transition
(
'* => zoomOut'
,
opts
.
zoomOut
)
])
]
src/app/envCtrl/env-cfg/env-cfg.page.html
View file @
f683a72f
This diff is collapsed.
Click to expand it.
src/app/envCtrl/env-cfg/env-cfg.page.ts
View file @
f683a72f
This diff is collapsed.
Click to expand it.
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