Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
ec-report-refactor
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
lihuizhen
ec-report-refactor
Commits
9dcef732
Commit
9dcef732
authored
Jan 19, 2022
by
peco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:进度条
parent
4cfcbebd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
1 deletion
+75
-1
NormalProgress.vue
components/NormalProgress/NormalProgress.vue
+72
-0
index.vue
pages/index/index.vue
+3
-1
No files found.
components/NormalProgress/NormalProgress.vue
0 → 100644
View file @
9dcef732
<
template
>
<view
class=
"container"
>
<u-line-progress
class=
"u-line"
v-if=
"elementInfo.option.progress.type === 'line'"
:style=
"
{'width': elementInfo.width + 'rpx'}"
:height="elementInfo.option.progress.height"
:active-color="elementInfo.option.progress.strokeColor"
:inactive-color="elementInfo.option.progress.trailColor"
:round="elementInfo.option.progress.strokeLinecap == 'round' ? true : false"
:percent="elementInfo.data.dataList.endVal"
:show-percent="elementInfo.option.progress.showInfo">
</u-line-progress>
<u-circle-progress
class=
"u-circle"
v-if=
"elementInfo.option.progress.type === 'circle'"
:width=
"elementInfo.option.progress.width"
:border-width=
"elementInfo.option.progress.strokeWidth"
:active-color=
"elementInfo.option.progress.strokeColor"
:inactive-color=
"elementInfo.option.progress.trailColor"
:percent=
"elementInfo.data.dataList.endVal"
:bg-color=
"00000000"
>
<view
class=
"u-progress-text"
>
{{
elementInfo
.
data
.
dataList
.
endVal
}}
%
</view>
</u-circle-progress>
</view>
</
template
>
<
script
>
import
uniEcCanvas
from
'@/components/uni-ec-canvas/uni-ec-canvas'
import
*
as
echarts
from
'@/components/uni-ec-canvas/echarts'
import
echartElementData
from
'@/mixins/echartElementData.js'
let
chart
=
null
export
default
{
name
:
"NormalProgress"
,
mixins
:
[
echartElementData
],
data
()
{
return
{
};
},
onReady
()
{
},
components
:
{
uniEcCanvas
},
methods
:
{
}
}
</
script
>
<
style
>
.container
{
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
}
.u-line
{
align-self
:
center
;
}
.u-circle
{
align-self
:
center
;
}
.u-progress-text
{
font-size
:
40
rpx
;
font-weight
:
bold
;
color
:
white
;
}
</
style
>
\ No newline at end of file
pages/index/index.vue
View file @
9dcef732
...
...
@@ -28,6 +28,8 @@
<BasicText
v-if=
"element.type == 'BasicText'"
:elementInfo=
"element"
></BasicText>
<!-- 真实时间 -->
<RealTime
v-if=
"element.type == 'RealTime'"
:elementInfo=
"element"
></RealTime>
<!-- 普通进度条 -->
<NormalProgress
v-if=
"element.type == 'NormalProgress'"
:elementInfo=
"element"
></NormalProgress>
</view>
</view>
</
template
>
...
...
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