组件修改

feasure-livedata
lld 2026-03-26 19:32:08 +08:00
parent cac9a78f0c
commit 5ee6975af8
1 changed files with 18 additions and 6 deletions

View File

@ -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,7 +127,19 @@
default () {
return [];
}
}
},
mode: {
type: String,
default: 'aspectFit'
},
imgWidth: {
type: String,
default: ''
},
bgColor: {
type: String,
default: 'transparent'
}
},
// inject: ['list'],
computed: {