Commit 1299e587 by zhangyongfeng

名单列表计算问题

parent f145b910
...@@ -37,18 +37,20 @@ ...@@ -37,18 +37,20 @@
:style="resCardStyle" :style="resCardStyle"
:data-id="item" :data-id="item"
@click="showRes = false" @click="showRes = false"
:class="{
numberOver:
!!photos.find(d => d.id === item) ||
!!list.find(d => d.key === item)
}"
> >
<span <span class="cont" v-if="!photos.find(d => d.id === item)">
class="cont" <span
:style="{ v-if="!!list.find(d => d.key === item)"
fontSize: list[item - 1] && list[item - 1].name ? '36px' : null, :style="{
lineHeight: fontSize: '40px'
list[item - 1] && list[item - 1].name ? '80px' : null }"
}" >
v-if="!photos.find(d => d.id === item)" {{ list.find(d => d.key === item).name }}
>
<span v-if="list[item - 1] && list[item - 1].name">
{{ list[item - 1].name }}
</span> </span>
<span v-else> <span v-else>
{{ item }} {{ item }}
...@@ -374,25 +376,26 @@ export default { ...@@ -374,25 +376,26 @@ export default {
margin-top: 70px; margin-top: 70px;
cursor: pointer; cursor: pointer;
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative; position: relative;
.key { .cont {
color: red; display: flex;
justify-content: center;
align-items: center;
} }
&::before { &.numberOver::before {
content: attr(data-id); content: attr(data-id);
width: 70px; width: 30px;
height: 50px; height: 22px;
line-height: 22px;
background-color: #fff; background-color: #fff;
position: absolute; position: absolute;
top: -50px; bottom: 0;
left: 50%; left: 0;
transform: translateX(-50%); font-size: 14px;
font-size: 30px; // border-radius: 50%;
line-height: 50px; z-index: 1;
border-radius: 50%;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment