组件修改
parent
cac9a78f0c
commit
5ee6975af8
|
|
@ -6,15 +6,15 @@
|
|||
<view :class="{ 'uni-list--border': border, 'uni-list-chat--first': isFirstChild }"></view>
|
||||
<view class="uni-list-chat__container">
|
||||
<view class="uni-list-chat__header-warp">
|
||||
<view v-if="avatarCircle || avatarList.length === 0" class="uni-list-chat__header" :class="{ 'header--circle': avatarCircle }">
|
||||
<image class="uni-list-chat__header-image" :class="{ 'header--circle': avatarCircle }" :src="avatarUrl" mode="aspectFill"></image>
|
||||
<view v-if="avatarCircle || avatarList.length === 0" :style="{background: bgColor}" class="uni-list-chat__header" :class="{ 'header--circle': avatarCircle }">
|
||||
<image :style="{ width: imgWidth }" class="uni-list-chat__header-image" :class="{ 'header--circle': avatarCircle }" :src="avatarUrl" :mode="mode"></image>
|
||||
</view>
|
||||
<!-- 头像组 -->
|
||||
<view v-else class="uni-list-chat__header">
|
||||
<view v-for="(item, index) in avatarList" :key="index" class="uni-list-chat__header-box" :class="computedAvatar"
|
||||
:style="{ width: imageWidth + 'px', height: imageWidth + 'px' }">
|
||||
<image class="uni-list-chat__header-image" :style="{ width: imageWidth + 'px', height: imageWidth + 'px' }" :src="item.url"
|
||||
mode="aspectFill"></image>
|
||||
:style="{ width: imageWidth + 'px', height: imageWidth + 'px', backgroundColor: '#FFA726' }">
|
||||
<image class="uni-list-chat__header-image" :style="{ width: imgWidth }" :src="item.url"
|
||||
:mode="mode"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -127,6 +127,18 @@
|
|||
default () {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
default: 'aspectFit'
|
||||
},
|
||||
imgWidth: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: 'transparent'
|
||||
}
|
||||
},
|
||||
// inject: ['list'],
|
||||
|
|
|
|||
Loading…
Reference in New Issue