Commit 24e75f0a by panjiangyi

打开会话时滚动到地步

parent 7655202a
Showing with 2 additions and 0 deletions
...@@ -174,6 +174,7 @@ export default class MessageList extends Vue { ...@@ -174,6 +174,7 @@ export default class MessageList extends Vue {
this.scollWrapper && this.scollWrapper &&
this.scollWrapper.addEventListener("scroll", this.handleScroll); this.scollWrapper.addEventListener("scroll", this.handleScroll);
this.saveScrollToBottomFunc(this.scrollToNewMsg); this.saveScrollToBottomFunc(this.scrollToNewMsg);
this.scrollToNewMsg();
} }
public beforeDestroy() { public beforeDestroy() {
......
...@@ -502,6 +502,7 @@ export default { ...@@ -502,6 +502,7 @@ export default {
dispatch(ChatStore.ACTION_GET_CHAT_MEMBERS), dispatch(ChatStore.ACTION_GET_CHAT_MEMBERS),
]); ]);
commit(ChatStore.MUTATION_INITING_CHAT_DONE); commit(ChatStore.MUTATION_INITING_CHAT_DONE);
commit(ChatStore.MUTATION_SCROLL_TO_BOTTOM);
}, },
async [ChatStore.ACTION_CLEAR_CURRENT_CHAT_DATA]({ commit }) { async [ChatStore.ACTION_CLEAR_CURRENT_CHAT_DATA]({ commit }) {
commit(ChatStore.MUTATION_CLEAR_CURRENT_CHAT_ID); commit(ChatStore.MUTATION_CLEAR_CURRENT_CHAT_ID);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment