Commit 1d90677b by Sixong.Zhu

u

parent f2a6352f
......@@ -172,9 +172,8 @@
public mounted() {
this.scollWrapper &&
this.scollWrapper.addEventListener("scroll", this.handleScroll);
this.saveScrollToBottomFunc((e) => {
this.saveScrollToBottomFunc(() => {
this.scrollToNewMsg();
this.checkReadingStatus(e);
});
this.scrollToNewMsg();
setTimeout(() => this.scroll2End(200));
......@@ -209,10 +208,6 @@
});
}
private checkReadingStatus(e: Message) {
return e;
}
private startLoading() {
this.loading = true;
}
......
......@@ -304,7 +304,7 @@ export default {
state[ChatStore.STATE_SINGLE_CHAT] = null;
},
[ChatStore.MUTATION_SCROLL_TO_BOTTOM](state) {
state[ChatStore.STATE_FUNC_SCROLL_TO_BOTTOM](null);
state[ChatStore.STATE_FUNC_SCROLL_TO_BOTTOM]();
},
[ChatStore.MUTATION_SAVE_FUNC_SCROLL_TO_BOTTOM](
state,
......
......@@ -77,7 +77,7 @@ export namespace ChatStore {
export type STATE_CURRENT_CHAT_TITLE = string;
export const STATE_FUNC_SCROLL_TO_BOTTOM = "收到消息后滚动到底部的方法";
export type STATE_FUNC_SCROLL_TO_BOTTOM = (e: chatDto.Message) => void;
export type STATE_FUNC_SCROLL_TO_BOTTOM = (e?: chatDto.Message) => void;
export const STATE_FUNC_ON_NEW_MSG = "收到消息回调方法";
export type STATE_FUNC_ON_NEW_MSG = (e: chatDto.Message) => void;
......@@ -204,7 +204,7 @@ export namespace ChatStore {
export const MUTATION_SAVE_FUNC_SCROLL_TO_BOTTOM =
"保存收到新消息后滚动到底部的方法";
export type MUTATION_SAVE_FUNC_SCROLL_TO_BOTTOM = (
func: (e: chatDto.Message) => void
func: (e?: chatDto.Message) => void
) => void;
export const MUTATION_CLEAR_FUNC_SCROLL_TO_BOTTOM =
"删除收到新消息后滚动到底部的方法";
......
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