Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1d90677b
authored
Jan 17, 2022
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
u
parent
f2a6352f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
9 deletions
components/message-list.vue
store/index.ts
store/model.ts
components/message-list.vue
View file @
1d90677b
...
...
@@ -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
;
}
...
...
store/index.ts
View file @
1d90677b
...
...
@@ -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
,
...
...
store/model.ts
View file @
1d90677b
...
...
@@ -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
=
"删除收到新消息后滚动到底部的方法"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment