|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="conversation-list">
|
|
|
+ <div class="conversation-list" style="height: 100%;">
|
|
|
<!-- <div class="item"></div> -->
|
|
|
<van-list
|
|
|
v-model="loading"
|
|
@@ -30,6 +30,16 @@
|
|
|
<el-image
|
|
|
:src="item.profile ? item.profile.portraitUri : ''"
|
|
|
class="user-img"
|
|
|
+ fit="cover"
|
|
|
+ @error="
|
|
|
+ () => {
|
|
|
+ // 图片加载失败,显示默认头像
|
|
|
+ item.profile.portraitUri =
|
|
|
+ item.profile.conversationType === 1
|
|
|
+ ? teacherLogo
|
|
|
+ : groupLogo;
|
|
|
+ }
|
|
|
+ "
|
|
|
/>
|
|
|
</el-badge>
|
|
|
</template>
|
|
@@ -57,6 +67,13 @@
|
|
|
</div>
|
|
|
</van-list>
|
|
|
|
|
|
+ <el-empty
|
|
|
+ v-if="!list.length"
|
|
|
+ :image="emptyImg"
|
|
|
+ style="width: 100%;height: 100%"
|
|
|
+ description=" "
|
|
|
+ ></el-empty>
|
|
|
+
|
|
|
<Contextmenu
|
|
|
:dropdown="dropdown"
|
|
|
:dropdownList="dropdownList"
|
|
@@ -102,6 +119,9 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ emptyImg: require("../imkit/images/no-conversation.svg"),
|
|
|
+ teacherLogo,
|
|
|
+ groupLogo,
|
|
|
conversationList: [],
|
|
|
list: [],
|
|
|
loading: false,
|