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
2203e4a0
Commit
2203e4a0
authored
Feb 22, 2022
by
leon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:CountTo and NumberScroll add new config
parent
e510c83f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
CountTo.vue
components/CountTo/CountTo.vue
+6
-2
NumberScroll.vue
components/NumberScroll/NumberScroll.vue
+1
-1
No files found.
components/CountTo/CountTo.vue
View file @
2203e4a0
...
...
@@ -2,7 +2,7 @@
<view
class=
"count-to"
:style=
"
{height: `${height}px`,}">
<NormalTitle
:elementInfo=
"elementInfo"
></NormalTitle>
<!-- warning:count-to的font-size单位为rpx -->
<u-count-to
:start-val=
"startVal"
:end-val=
"endVal"
separator=
","
:color=
"elementInfo.option.countTo.color"
:font-size=
"getFontSize()"
></u-count-to>
<u-count-to
:start-val=
"startVal"
:end-val=
"endVal"
:duration=
"duration"
separator=
","
:color=
"elementInfo.option.countTo.color"
:font-size=
"getFontSize()"
></u-count-to>
</view>
</
template
>
...
...
@@ -15,7 +15,8 @@
return
{
startVal
:
0
,
endVal
:
0
,
height
:
0
height
:
0
,
duration
:
2000
};
},
...
...
@@ -28,6 +29,9 @@
this
.
$nextTick
(()
=>
{
this
.
startVal
=
this
.
endVal
this
.
endVal
=
this
.
elementData
.
dataList
.
endVal
if
(
this
.
elementInfo
.
option
.
countTo
.
duration
)
{
this
.
duration
=
this
.
elementInfo
.
option
.
countTo
.
duration
*
1000
}
})
},
// 计算组件高度
...
...
components/NumberScroll/NumberScroll.vue
View file @
2203e4a0
<
template
>
<view
class=
"chart-num"
:style=
"
{height: `${height}px`,}">
<view
class=
"chart-num"
:style=
"
{height: `${height}px`,
'margin-top': `${elementInfo.option.title.titleMarginTop}px`
}">
<!--
<BasicText
:elementInfo=
"elementInfo"
></BasicText>
-->
<NormalTitle
:elementInfo=
"elementInfo"
></NormalTitle>
<ul
class=
"box-item marginTop20"
>
...
...
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