Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dashboard
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
郭铭瑶
dashboard
Commits
0581e983
Commit
0581e983
authored
Nov 10, 2019
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善progress bar滚动效果
parent
3c53199f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
24 deletions
+49
-24
App.vue
src/App.vue
+1
-0
monitor-progress.vue
src/components/MonitorProgress/monitor-progress.vue
+21
-20
main.vue
src/views/main.vue
+27
-4
No files found.
src/App.vue
View file @
0581e983
...
...
@@ -31,5 +31,6 @@ html, body
-moz-osx-font-smoothing grayscale
width 100%
height 100%
overflow: hidden
color $fontColor
</
style
>
src/components/MonitorProgress/monitor-progress.vue
View file @
0581e983
...
...
@@ -4,7 +4,7 @@
<div
class=
"progress-bar"
/>
<div
class=
"progress-bg"
:style=
"bgStyle"
/>
</div>
<b
v-if=
"!hideInfo"
class=
"progress-info"
>
<b
v-if=
"!hideInfo"
class=
"progress-info"
:style=
"infoStyle"
>
<m-count
:value=
"percent"
/>
%
</b>
</div>
...
...
@@ -30,21 +30,19 @@ export default {
type
:
Boolean
,
default
:
false
,
},
status
:
{
type
:
String
,
default
:
'active'
,
}
},
computed
:
{
style
()
{
if
(
!
this
.
hideInfo
)
{
return
{
width
:
'95%'
,
}
const
size
=
Math
.
round
(
this
.
size
/
10
)
const
result
=
{
padding
:
`
${(
size
/
5
).
toFixed
(
1
)}
rem
${(
size
/
4.5
).
toFixed
(
1
)}
rem`
,
}
return
{
width
:
'100%'
,
if
(
!
this
.
hideInfo
)
{
result
.
width
=
'93%'
}
else
{
result
.
width
=
'100%'
}
return
result
},
containerStyle
()
{
return
{
...
...
@@ -63,6 +61,11 @@ export default {
}
}
},
infoStyle
()
{
return
{
fontSize
:
`
${(
this
.
size
*
0.7
/
10
).
toFixed
(
1
)}
rem`
,
}
},
}
}
</
script
>
...
...
@@ -70,7 +73,6 @@ export default {
<
style
lang=
"stylus"
scoped
>
$radius = 2rem
.monitor-progress
padding 0.5rem 0.6rem
position relative
border-radius $radius
background rgba(0,0,0,0.18)
...
...
@@ -90,22 +92,21 @@ $radius = 2rem
&.progress-bar
z-index 1
opacity 0.2
background-image repeating-linear-gradient(45deg, #fff, #fff 0.8rem, transparent 0.8rem, transparent 1.
4
rem)
background-size 1
0
rem
animation
loading-slide 3
0s linear infinite running
background-image repeating-linear-gradient(45deg, #fff, #fff 0.8rem, transparent 0.8rem, transparent 1.
2
rem)
background-size 1
7
rem
animation
rolling 1
0s linear infinite running
.progress-info
display flex
align-items center
justify-content center
width
5
%
width
7
%
position absolute
right -
5
%
right -
7
%
top 0
color $edgeColor
font-size 1.6rem
height 100%
text-shadow 0 0 0.6rem $edgeColor
@keyframes
loading-slide
@keyframes
rolling
to
background-position
100%
background-position
-x 17rem
</
style
>
src/views/main.vue
View file @
0581e983
...
...
@@ -18,8 +18,27 @@
</div>
</m-card>
</div>
<div
class=
"box3"
><m-card></m-card></div>
<div
class=
"box4"
><m-card></m-card></div>
<div
class=
"box3"
>
<m-card>
<div
class=
"chart-wrapper"
><Chart/></div>
<div>
<p
style=
"color: #ccc"
>
收入组成
</p>
<br>
<div
style=
"display: flex;margin-bottom: 0.5rem;"
><span
style=
"color: #0eb2ee; width: 15%;text-align: right;"
>
人力制
</span>
<div
style=
"width: 85%;margin-left: 1rem"
><m-progress
:percent=
"percent"
:size=
"14"
/></div></div>
<div
style=
"display: flex;margin-bottom: 0.5rem;"
><span
style=
"color: #0eb2ee; width: 15%;text-align: right;"
>
项目制
</span>
<div
style=
"width: 85%;margin-left: 1rem"
><m-progress
:percent=
"percent"
:size=
"14"
/></div></div>
<div
style=
"display: flex;margin-bottom: 4rem;"
><span
style=
"color: #0eb2ee; width: 15%;text-align: right;"
>
其他收入
</span>
<div
style=
"width: 85%;margin-left: 1rem"
><m-progress
:percent=
"percent"
:size=
"14"
/></div></div>
<div
style=
"text-align: right"
>
<m-brief
label=
"人均收入"
:count=
"13417"
unit=
"元"
/>
</div>
</div>
</m-card>
</div>
<div
class=
"box4"
>
<m-card>
<div
class=
"chart-wrapper"
><Chart/></div>
<div></div>
</m-card>
</div>
<div
class=
"box5"
><m-card><Chart></Chart></m-card></div>
<div
class=
"box6"
>
<m-card
title=
"收入监控"
>
...
...
@@ -46,8 +65,8 @@ export default {
},
mounted
()
{
setTimeout
(()
=>
{
this
.
percent
=
8
0
},
100
)
this
.
percent
=
5
0
},
100
0
)
}
}
</
script
>
...
...
@@ -79,4 +98,8 @@ export default {
grid-area box5
.box6
grid-area box6
.chart-wrapper
height 48%
margin-bottom 1rem
border-bottom $cardBorder
</
style
>
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