Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
Project
Project
Details
Activity
Releases
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
刘文虎
account-book
Commits
12f90e11
Commit
12f90e11
authored
Aug 17, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/liuwenhu/account-book
parents
4cf9066d
6721336c
Pipeline
#3258
canceled with stages
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
20 deletions
+74
-20
index.vue
components/cell-card-swiper/index.vue
+74
-20
No files found.
components/cell-card-swiper/index.vue
View file @
12f90e11
...
...
@@ -4,25 +4,39 @@
hover-class=
"u-hover-class"
@
click
.
stop=
"$u.throttle(handleClickCard, 500)"
>
<swiper
class=
"swiper"
:indicator-dots=
"true"
indicator-color=
"rgba(2, 160, 116, 0.45)"
indicator-active-color=
"rgba(2, 160, 116, 1)"
style=
"height: 420rpx"
>
<swiper-item>
<Card
ref=
"card"
:info=
"info"
@
save=
"handleCanvas"
@
update=
"handleUpdate"
/>
</swiper-item>
<swiper-item>
<CardBack
ref=
"cardBack"
:info=
"info"
@
save=
"handleCanvasBack"
/>
</swiper-item>
</swiper>
<view
class=
"swiper-view"
>
<swiper
class=
"swiper"
:indicator-dots=
"false"
:current=
"current"
style=
"height: 420rpx"
@
change=
"handleChange"
>
<swiper-item>
<Card
ref=
"card"
:info=
"info"
@
save=
"handleCanvas"
@
update=
"handleUpdate"
/>
</swiper-item>
<swiper-item>
<CardBack
ref=
"cardBack"
:info=
"info"
@
save=
"handleCanvasBack"
/>
</swiper-item>
</swiper>
</view>
<view
class=
"dot-view"
>
<view
:class=
"[
index == current
? 'u-indicator-item-round-active'
: 'u-indicator-item-round',
{ second: current == 1 },
]"
v-for="(item, index) in [0, 1]"
:key="index"
>
</view>
</view>
</view>
</
template
>
...
...
@@ -43,7 +57,9 @@ export default {
},
},
data
()
{
return
{}
return
{
current
:
0
,
}
},
computed
:
{},
...
...
@@ -66,6 +82,9 @@ export default {
handleCanvasBack
(
res
)
{
this
.
$refs
.
card
.
saveImage
()
},
handleChange
(
event
)
{
this
.
current
=
event
.
detail
.
current
},
},
}
</
script
>
...
...
@@ -77,5 +96,40 @@ export default {
background-color
:
#ffffff
;
position
:
relative
;
overflow
:
hidden
;
.swiper-view
{
position
:
relative
;
}
.dot-view
{
position
:
absolute
;
top
:
364rpx
;
left
:
0
;
right
:
0
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
56rpx
;
.u-indicator-item-round
{
width
:
14rpx
;
height
:
14rpx
;
margin
:
0
6rpx
;
border-radius
:
20rpx
;
transition
:
all
0
.5s
;
background-color
:
rgba
(
2
,
160
,
116
,
0
.45
);
&
.second
{
background-color
:
rgba
(
0
,
0
,
0
,
0
.3
);
}
}
.u-indicator-item-round-active
{
height
:
14rpx
;
margin
:
0
6rpx
;
border-radius
:
20rpx
;
transition
:
all
0
.5s
;
width
:
34rpx
;
background-color
:
rgba
(
2
,
160
,
116
,
1
);
&
.second
{
background-color
:
rgba
(
255
,
255
,
255
,
0
.8
);
}
}
}
}
</
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