|
@@ -21,13 +21,13 @@
|
|
<div
|
|
<div
|
|
class="list-item"
|
|
class="list-item"
|
|
:class="
|
|
:class="
|
|
- walletStore.account == item.toUsername ? '' : 'flex-reverse'
|
|
|
|
|
|
+ isSender(item.toUsername) ? '' : 'flex-reverse'
|
|
"
|
|
"
|
|
>
|
|
>
|
|
<!-- 头像 -->
|
|
<!-- 头像 -->
|
|
<van-image
|
|
<van-image
|
|
class="list-img"
|
|
class="list-img"
|
|
- :class="walletStore.account == item.toUsername ? 'mr12' : 'ml12'"
|
|
|
|
|
|
+ :class="isSender(item.toUsername) ? 'mr12' : 'ml12'"
|
|
round
|
|
round
|
|
:src="item.avatar"
|
|
:src="item.avatar"
|
|
@click="router.push('personal')"
|
|
@click="router.push('personal')"
|
|
@@ -76,8 +76,8 @@
|
|
controls
|
|
controls
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
/> -->
|
|
/> -->
|
|
- <messageAudio v-if="item.localUrl" :src="item.localUrl"/>
|
|
|
|
- <messageAudio v-else :src="IM_PATH + item.url"/>
|
|
|
|
|
|
+ <messageAudio v-if="item.localUrl" :src="item.localUrl" :isSender="isSender(item.toUsername)"/>
|
|
|
|
+ <messageAudio v-else :src="IM_PATH + item.url" :isSender="isSender(item.toUsername)"/>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 其他未知类型 -->
|
|
<!-- 其他未知类型 -->
|
|
@@ -195,6 +195,10 @@ const chatListRef = ref(null);
|
|
const emojiRef = ref(null);
|
|
const emojiRef = ref(null);
|
|
const toolsRef = ref(null);
|
|
const toolsRef = ref(null);
|
|
|
|
|
|
|
|
+const isSender = (toUsername) => {
|
|
|
|
+ return walletStore.account === toUsername;
|
|
|
|
+};
|
|
|
|
+
|
|
// 滚动到底部
|
|
// 滚动到底部
|
|
const scrollToBottom = () => {
|
|
const scrollToBottom = () => {
|
|
nextTick(() => {
|
|
nextTick(() => {
|