|
@@ -93,6 +93,16 @@ export default {
|
|
|
return {};
|
|
|
},
|
|
|
},
|
|
|
+ latelyContacts: {
|
|
|
+ type: Function,
|
|
|
+ default(list){
|
|
|
+ const data = list.filter(item => !isEmpty(item.lastContent));
|
|
|
+ data.sort((a1, a2) => {
|
|
|
+ return a2.lastSendTime - a1.lastSendTime;
|
|
|
+ });
|
|
|
+ return data;
|
|
|
+ },
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
this.CacheContactContainer = new MemoryCache();
|
|
@@ -144,11 +154,7 @@ export default {
|
|
|
return DEFAULT_MENUS.includes(this.activeSidebar);
|
|
|
},
|
|
|
lastMessages() {
|
|
|
- const data = this.contacts.filter(item => !isEmpty(item.lastContent));
|
|
|
- data.sort((a1, a2) => {
|
|
|
- return a2.lastSendTime - a1.lastSendTime;
|
|
|
- });
|
|
|
- return data;
|
|
|
+ return this.latelyContacts(this.contacts);
|
|
|
},
|
|
|
},
|
|
|
watch: {
|
|
@@ -1075,14 +1081,14 @@ export default {
|
|
|
},
|
|
|
setAtUserList(data,callEvery) {
|
|
|
this.$refs.editor.chatArea.updateConfig({
|
|
|
- userList: data,
|
|
|
- needCallEvery: callEvery
|
|
|
- });
|
|
|
- },
|
|
|
- setUserTag(data) {
|
|
|
- this.$refs.editor.chatArea.setUserTag(data);
|
|
|
- this.$refs.editor._checkSubmitDisabled();
|
|
|
- },
|
|
|
+ userList: data,
|
|
|
+ needCallEvery: callEvery
|
|
|
+ });
|
|
|
+ },
|
|
|
+ setUserTag(data) {
|
|
|
+ this.$refs.editor.chatArea.setUserTag(data);
|
|
|
+ this.$refs.editor._checkSubmitDisabled();
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|