Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
h5-watch
Overview
Overview
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
苏文标
h5-watch
Commits
f650a699
Commit
f650a699
authored
Oct 17, 2022
by
suwenbiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除测试代码
parent
396cd15d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
161 deletions
+9
-161
App.vue
App.vue
+3
-0
index.vue
pages/index/index.vue
+6
-161
No files found.
App.vue
View file @
f650a699
...
...
@@ -14,4 +14,7 @@
<
style
>
/*每个页面公共css */
.contents
{
overflow-x
:
hidden
;
}
</
style
>
pages/index/index.vue
View file @
f650a699
<
template
>
<view
class=
"u-page"
>
<view
class=
"u-demo-block"
>
<text
class=
"u-demo-block__title"
>
基础功能
</text>
<view
class=
"u-demo-block__content"
>
<view
class=
"u-page__tag-item"
>
<u-count-to
:endVal=
"value"
@
end=
"end"
></u-count-to>
</view>
</view>
</view>
<view
class=
"u-demo-block"
>
<text
class=
"u-demo-block__title"
>
倒计数
</text>
<view
class=
"u-demo-block__content"
>
<view
class=
"u-page__tag-item"
>
<u-count-to
:startVal=
"startVal1"
></u-count-to>
</view>
</view>
</view>
<view
class=
"u-demo-block"
>
<text
class=
"u-demo-block__title"
>
显示小数位
</text>
<view
class=
"u-demo-block__content"
>
<view
class=
"u-page__tag-item"
>
<u-count-to
:startVal=
"startVal2"
:endVal=
"endVal"
:decimals=
"decimals"
></u-count-to>
</view>
</view>
</view>
<view
class=
"u-demo-block"
>
<text
class=
"u-demo-block__title"
>
千分位分隔符
</text>
<view
class=
"u-demo-block__content"
>
<view
class=
"u-page__tag-item"
>
<u-count-to
:startVal=
"startVal3"
:endVal=
"endVal2"
separator=
","
:decimals=
"decimals"
></u-count-to>
</view>
</view>
</view>
<view
class=
"u-demo-block"
>
<text
class=
"u-demo-block__title"
>
自定义控制
</text>
<view
class=
"u-demo-block__content"
>
<view
class=
"u-page__tag-item"
>
<u-count-to
ref=
"uCountTo"
:endVal=
"endVal3"
:autoplay=
"autoplay"
></u-count-to>
</view>
</view>
<view
class=
"u-demo-block__content"
>
<view
class=
""
style=
"flex: 1;"
>
<u-grid
border
align=
"center"
customStyle=
"margin-top: 20px;margin-bottom: 20"
>
<u-grid-item
@
click=
"start"
>
<view
class=
"u-grid-slot"
>
<view
class=
"u-grid-slot__circle"
>
<text
class=
"u-grid-slot__circle__text"
>
开始
</text>
</view>
</view>
</u-grid-item>
<u-grid-item
@
click=
"paused"
>
<view
class=
"u-grid-slot"
>
<view
class=
"u-grid-slot__circle"
>
<text
class=
"u-grid-slot__circle__text"
>
暂停
</text>
</view>
</view>
</u-grid-item>
<u-grid-item
@
click=
"resume"
>
<view
class=
"u-grid-slot"
>
<view
class=
"u-grid-slot__circle"
>
<text
class=
"u-grid-slot__circle__text"
>
继续
</text>
</view>
</view>
</u-grid-item>
</u-grid>
</view>
</view>
</view>
<view
class=
"u-demo-block"
>
<text
class=
"u-demo-block__title"
>
自定义
</text>
<view
class=
"u-demo-block__content"
>
<view
class=
"u-page__tag-item"
>
<u-count-to
:endVal=
"value"
color=
"#909399"
:fontSize=
"fontSize"
:bold=
"true"
></u-count-to>
</view>
</view>
</view>
<view
class=
"contents"
>
</view>
</
template
>
...
...
@@ -110,71 +8,18 @@
export
default
{
data
()
{
return
{
value
:
3000
,
startVal1
:
300
,
startVal2
:
100.00
,
endVal
:
10.55
,
decimals
:
2
,
startVal3
:
2000
,
endVal2
:
1542
,
endVal3
:
3000
,
autoplay
:
false
,
color
:
'#FF0000'
,
fontSize
:
40
,
}
},
onLoad
()
{
// setTimeout(() => {
// this.value = 3000
// }, 3000)
},
methods
:
{
start
()
{
this
.
$refs
.
uCountTo
.
start
();
},
paused
()
{
this
.
$refs
.
uCountTo
.
stop
()
},
resume
()
{
this
.
$refs
.
uCountTo
.
resume
()
},
end
()
{
console
.
log
(
'end'
);
}
}
}
</
script
>
<
style
lang=
"scss"
>
.u-demo-block
{
margin-top
:
30
rpx
;
margin-left
:
30px
;
}
.u-demo-block__content
{
flex-direction
:
row
;
flex-wrap
:
wrap
;
align-items
:
center
;
}
.u-grid-slot
{
border-radius
:
100px
;
border-color
:
#dbfbdb
;
border-width
:
2px
;
@include
flex;
&__circle
{
width
:
50px
;
height
:
50px
;
background-color
:
#dbfbdb
;
border-radius
:
100px
;
justify-content
:
center
;
align-items
:
center
;
margin
:
2px
;
&__text
{
color
:
rgb
(
25
,
190
,
107
);
font-size
:
13px
;
}
}
}
</
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