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