1299e587 by zhangyongfeng

名单列表计算问题

1 parent f145b910
Showing 1 changed file with 22 additions and 19 deletions
...@@ -37,18 +37,20 @@ ...@@ -37,18 +37,20 @@
37 :style="resCardStyle" 37 :style="resCardStyle"
38 :data-id="item" 38 :data-id="item"
39 @click="showRes = false" 39 @click="showRes = false"
40 :class="{
41 numberOver:
42 !!photos.find(d => d.id === item) ||
43 !!list.find(d => d.key === item)
44 }"
40 > 45 >
46 <span class="cont" v-if="!photos.find(d => d.id === item)">
41 <span 47 <span
42 class="cont" 48 v-if="!!list.find(d => d.key === item)"
43 :style="{ 49 :style="{
44 fontSize: list[item - 1] && list[item - 1].name ? '36px' : null, 50 fontSize: '40px'
45 lineHeight:
46 list[item - 1] && list[item - 1].name ? '80px' : null
47 }" 51 }"
48 v-if="!photos.find(d => d.id === item)"
49 > 52 >
50 <span v-if="list[item - 1] && list[item - 1].name"> 53 {{ list.find(d => d.key === item).name }}
51 {{ list[item - 1].name }}
52 </span> 54 </span>
53 <span v-else> 55 <span v-else>
54 {{ item }} 56 {{ item }}
...@@ -374,25 +376,26 @@ export default { ...@@ -374,25 +376,26 @@ export default {
374 margin-top: 70px; 376 margin-top: 70px;
375 cursor: pointer; 377 cursor: pointer;
376 display: flex; 378 display: flex;
377 flex-direction: column;
378 align-items: center; 379 align-items: center;
379 justify-content: center; 380 justify-content: center;
380 position: relative; 381 position: relative;
381 .key { 382 .cont {
382 color: red; 383 display: flex;
384 justify-content: center;
385 align-items: center;
383 } 386 }
384 &::before { 387 &.numberOver::before {
385 content: attr(data-id); 388 content: attr(data-id);
386 width: 70px; 389 width: 30px;
387 height: 50px; 390 height: 22px;
391 line-height: 22px;
388 background-color: #fff; 392 background-color: #fff;
389 position: absolute; 393 position: absolute;
390 top: -50px; 394 bottom: 0;
391 left: 50%; 395 left: 0;
392 transform: translateX(-50%); 396 font-size: 14px;
393 font-size: 30px; 397 // border-radius: 50%;
394 line-height: 50px; 398 z-index: 1;
395 border-radius: 50%;
396 } 399 }
397 } 400 }
398 } 401 }
......