Commit 17127c7a authored by Xuguangxing's avatar Xuguangxing

fix: 处理头像问题

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