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
bd1a816c
authored
Oct 15, 2021
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
msg
parent
a595e7f1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
components/message-list.vue
components/msg-shortcut.vue
components/message-list.vue
View file @
bd1a816c
...
@@ -198,7 +198,7 @@ export default class MessageList extends Vue {
...
@@ -198,7 +198,7 @@ export default class MessageList extends Vue {
this
.
saveScrollToBottomFunc
(
this
.
scrollToNewMsg
);
this
.
saveScrollToBottomFunc
(
this
.
scrollToNewMsg
);
this
.
scrollToNewMsg
();
this
.
scrollToNewMsg
();
setTimeout
(()
=>
this
.
scroll2End
(
200
));
setTimeout
(()
=>
this
.
scroll2End
(
200
));
setTimeout
(()
=>
this
.
scroll2End
(
1000
));
setTimeout
(()
=>
this
.
scroll2End
(
1000
)
,
200
);
}
}
public
beforeDestroy
()
{
public
beforeDestroy
()
{
...
...
components/msg-shortcut.vue
View file @
bd1a816c
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
class=
"shortcut pointer"
class=
"shortcut pointer"
v-for=
"(reply, index) in replyList"
v-for=
"(reply, index) in replyList"
:key=
"reply.id"
:key=
"reply.id"
@
dblclick=
"goEdit(reply)"
>
>
<span
class=
"rep-index"
>
{{
index
+
1
}}
.
</span>
<span
class=
"rep-index"
>
{{
index
+
1
}}
.
</span>
<span
class=
"rep-content"
v-if=
"!editingItem[reply.id]"
>
{{
<span
class=
"rep-content"
v-if=
"!editingItem[reply.id]"
>
{{
...
@@ -49,6 +50,8 @@
...
@@ -49,6 +50,8 @@
maxlength=
"200"
maxlength=
"200"
minlength=
"2"
minlength=
"2"
:show-word-limit=
"true"
:show-word-limit=
"true"
:ref=
"`input-item-$
{reply.id}`"
:rows="buildRows(editingItemContent[reply.id])"
>
</el-input>
>
</el-input>
<div
class=
"btn-group"
>
<div
class=
"btn-group"
>
<el-button
<el-button
...
@@ -99,7 +102,7 @@
...
@@ -99,7 +102,7 @@
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Component
,
Vue
}
from
"vue-property-decorator"
;
import
{
Component
,
Ref
,
Vue
}
from
"vue-property-decorator"
;
import
{
MessageType
}
from
"../model"
;
import
{
MessageType
}
from
"../model"
;
import
{
ChatStore
,
chatStore
}
from
"../store/model"
;
import
{
ChatStore
,
chatStore
}
from
"../store/model"
;
...
@@ -126,6 +129,9 @@ export default class MsgShortCut extends Vue {
...
@@ -126,6 +129,9 @@ export default class MsgShortCut extends Vue {
@
chatStore
.
State
(
ChatStore
.
STATE_CHAT_CURRENT_IS_CHAT_MEMBER
)
@
chatStore
.
State
(
ChatStore
.
STATE_CHAT_CURRENT_IS_CHAT_MEMBER
)
private
readonly
isChatMember
!
:
ChatStore
.
STATE_CHAT_CURRENT_IS_CHAT_MEMBER
;
private
readonly
isChatMember
!
:
ChatStore
.
STATE_CHAT_CURRENT_IS_CHAT_MEMBER
;
@
chatStore
.
Action
(
ChatStore
.
ACTION_GET_MY_CHAT_LIST
)
protected
readonly
getMyChatList
!
:
ChatStore
.
ACTION_GET_MY_CHAT_LIST
;
private
replyList
:
Reply
[]
=
[];
private
replyList
:
Reply
[]
=
[];
private
uid
=
this
.
sdk
.
global
.
uid
;
private
uid
=
this
.
sdk
.
global
.
uid
;
private
replyInputVisible
=
false
;
private
replyInputVisible
=
false
;
...
@@ -148,7 +154,7 @@ export default class MsgShortCut extends Vue {
...
@@ -148,7 +154,7 @@ export default class MsgShortCut extends Vue {
return
this
.
_sendMsg
({
return
this
.
_sendMsg
({
msgType
:
MessageType
.
Text
,
msgType
:
MessageType
.
Text
,
msg
:
JSON
.
stringify
({
text
:
reply
.
content
,
source
:
this
.
source
}),
msg
:
JSON
.
stringify
({
text
:
reply
.
content
,
source
:
this
.
source
}),
});
})
.
then
(()
=>
this
.
getMyChatList
())
;
}
}
private
delReply
(
reply
:
Reply
)
{
private
delReply
(
reply
:
Reply
)
{
...
@@ -240,6 +246,22 @@ export default class MsgShortCut extends Vue {
...
@@ -240,6 +246,22 @@ export default class MsgShortCut extends Vue {
this
.
editCancel
(
reply
);
this
.
editCancel
(
reply
);
});
});
}
}
private
goEdit
(
reply
:
Reply
)
{
this
.
editing
(
reply
);
this
.
$nextTick
(()
=>
{
const
e
=
(
this
.
$refs
as
any
)[
`input-item-
${
reply
.
id
}
`
]
as
{
focus
:
()
=>
void
;
}[];
if
(
e
&&
e
.
length
)
{
e
[
0
].
focus
();
}
});
}
private
buildRows
(
content
:
string
)
{
return
Math
.
round
(
content
.
length
/
18
);
}
}
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
...
...
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