Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
公瑾
/
lucky-draw
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
1299e587
authored
2019-12-31 16:50:56 +0800
by
zhangyongfeng
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
名单列表计算问题
1 parent
f145b910
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
23 deletions
src/App.vue
src/App.vue
View file @
1299e58
...
...
@@ -37,18 +37,20 @@
:style=
"resCardStyle"
:data-id=
"item"
@
click=
"showRes = false"
:class=
"
{
numberOver:
!!photos.find(d => d.id === item) ||
!!list.find(d => d.key === item)
}"
>
<span
class=
"cont"
:style=
"
{
fontSize: list[item - 1]
&&
list[item - 1].name ? '36px' : null,
lineHeight:
list[item - 1]
&&
list[item - 1].name ? '80px' : null
}"
v-if="!photos.find(d => d.id === item)"
>
<span
v-if=
"list[item - 1] && list[item - 1].name"
>
{{
list
[
item
-
1
].
name
}}
<span
class=
"cont"
v-if=
"!photos.find(d => d.id === item)"
>
<span
v-if=
"!!list.find(d => d.key === item)"
:style=
"
{
fontSize: '40px'
}"
>
{{
list
.
find
(
d
=>
d
.
key
===
item
).
name
}}
</span>
<span
v-else
>
{{
item
}}
...
...
@@ -374,25 +376,26 @@ export default {
margin-top
:
70px
;
cursor
:
pointer
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
position
:
relative
;
.key
{
color
:
red
;
.cont
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
&
::before
{
&
.numberOver
::before
{
content
:
attr
(
data-id
);
width
:
70px
;
height
:
50px
;
width
:
30px
;
height
:
22px
;
line-height
:
22px
;
background-color
:
#fff
;
position
:
absolute
;
top
:
-50px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
font-size
:
30px
;
line-height
:
50px
;
border-radius
:
50%
;
bottom
:
0
;
left
:
0
;
font-size
:
14px
;
//
border-radius
:
50%
;
z-index
:
1
;
}
}
}
...
...
Please
register
or
sign in
to post a comment