Commit 17127c7a authored by Xuguangxing's avatar Xuguangxing

fix: 处理头像问题

parent 8e30f018
<template>
<div class="avator-group">
<div
v-for="(item, index) in avators.slice(0, 9)"
:key="index"
class="avator-item"
:style="widthStyle"
>
<div v-for="(item, index) in avators.slice(0, 9)" :key="index" class="avator-item">
<cr-image
class="avator-img"
:class="{ avator: index == 0 }"
......@@ -36,7 +31,6 @@
:key="`placeholder-${n}`"
class="placeholder"
:class="{ leader: avators.length == 0 }"
:style="widthStyle"
>
<template v-if="avators.length == 0 && n == 1">
<div class="is-leader">
......@@ -54,7 +48,7 @@
</template>
<div class="content" :class="{ avator: avators.length == 0 && n == 1 }">?</div>
</div>
<div v-if="groupHC >= 10" class="more" :style="widthStyle" @click="showMoreAvator">
<div v-if="groupHC >= 10" class="more" @click="showMoreAvator">
<div class="content" />
</div>
<template v-if="showDialogSlot">
......@@ -71,12 +65,7 @@
justify-content: center;
"
>
<div
v-for="(item, index) in avators"
:key="index"
class="avator-item"
:style="widthStyle"
>
<div v-for="(item, index) in avators" :key="index" class="avator-item">
<cr-image
:key="index"
:class="{ avator: index == 0 }"
......@@ -99,6 +88,7 @@
src="@/assets/images/leader-name.png"
/>
</div>
<div class="border" />
</div>
</div>
</cr-dialog>
......@@ -132,10 +122,6 @@ export default {
} else {
return this.groupHC - this.avators.length < 0 ? 0 : this.groupHC - this.avators.length;
}
},
widthStyle() {
// 用于单个头像不能占一排
return this.avators.length == 6 ? { width: '25%' } : { width: '20%' };
}
},
created() {
......@@ -168,14 +154,14 @@ export default {
}
.border {
position: absolute;
top: 0;
top: -1px;
left: 50%;
transform: translateX(-50%);
background: url('../assets/images/leaderBorder.png');
background-size: cover;
z-index: 2;
width: 44px;
height: 100%;
width: 48px;
height: 48px;
}
.avator {
// background: url('../assets/images/leaderBorder.png');
......@@ -201,8 +187,8 @@ export default {
}
.is-leader {
position: absolute;
right: 4px;
top: -9px;
right: 0px;
top: -10px;
z-index: 3;
.crown {
width: 22px;
......
......@@ -32,7 +32,13 @@
</template>
</template>
</div>
<div v-if="groupInfo.groupBuyStatus == 1 || groupInfo.groupBuyStatus == 0" class="gourp-rules">
<div
v-if="
(groupInfo.groupBuyStatus == 1 || groupInfo.groupBuyStatus == 0) &&
groupInfo.groupBuyNeedNewUserCount
"
class="gourp-rules"
>
<p>成团条件:{{ groupInfo.groupBuyCondition || '' }}</p>
<cr-image src="@/assets/images/flag.png" width="13px" />
</div>
......
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