Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Madara
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
Madara
Commits
07c00112
Commit
07c00112
authored
Sep 27, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 重复粘贴图片bug
parent
49ef067a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
6 deletions
+17
-6
index.vue
src/renderer/components/index.vue
+1
-0
chat.vue
src/renderer/components/msssage/chat.vue
+1
-1
index.vue
src/renderer/components/msssage/index.vue
+1
-0
contenteditor.vue
src/renderer/components/tools/contenteditor.vue
+14
-5
No files found.
src/renderer/components/index.vue
View file @
07c00112
...
...
@@ -180,6 +180,7 @@ export default {
},
methods
:
{
atMsg
(){
console
.
log
(
11111111111111
)
this
.
MsgBus
.
$emit
(
'send-at-name'
,
this
.
atInfo
.
atName
)
},
showCard
(
e
){
...
...
src/renderer/components/msssage/chat.vue
View file @
07c00112
...
...
@@ -274,7 +274,7 @@ export default {
},
mounted
()
{
let
user
=
this
.
$electron
.
remote
.
getGlobal
(
"LOGINUSER"
);
this
.
ImAccount
=
this
.
user
.
ImAccount
this
.
ImAccount
=
user
.
ImAccount
//获取记录的操作区域高度
if
(
localStorage
.
consoleh
&&
localStorage
.
consoleh
!=
""
)
{
this
.
consoleinfo
.
currenth
=
parseInt
(
localStorage
.
consoleh
);
...
...
src/renderer/components/msssage/index.vue
View file @
07c00112
...
...
@@ -312,6 +312,7 @@ export default {
this
.
TOPSESSION
=
topSession
;
},
enterChat
(
session
)
{
console
.
log
(
session
)
if
(
session
.
id
!=
this
.
currentSession
.
id
){
this
.
atIds
=
null
pageUtil
.
openDown
=
true
...
...
src/renderer/components/tools/contenteditor.vue
View file @
07c00112
...
...
@@ -81,9 +81,15 @@ export default {
deep
:
true
}
},
beforeDestroy
()
{
// 重复图片问题解决方案
// 事件处理中心msgBus,vue页面销毁后,原先的监听事件并没有销毁,导致组件再次载入的时候会重复相同的事件监听,所以当组件销毁时同时需要在 beforeDestroy 钩子中销毁对应的事件监听!!!
this
.
offMsgBusListener
()
},
mounted
()
{
let
that
=
this
;
this
.
MsgBus
.
$on
(
"send-at-name"
,
function
(
name
)
{
console
.
log
(
name
)
document
.
querySelector
(
'#msgEditorBox'
).
innerText
=
document
.
querySelector
(
'#msgEditorBox'
).
innerText
+
`@
${
name
}
`
})
this
.
MsgBus
.
$on
(
"close-copy"
,
function
()
{
...
...
@@ -207,6 +213,10 @@ export default {
let myInterval = window.setInterval(this.updateClipboard, 500);
},
methods: {
offMsgBusListener(){
this.MsgBus.$off("
send
-
at
-
name
");
this.MsgBus.$off("
new
-
screen
-
hot
");
},
toolPaste: function (e) {
let clipboardData = 1;
document.getElementById('msgEditorBox').focus();
...
...
@@ -391,17 +401,16 @@ export default {
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
5
;
}
.tool-copy
li
{
z-index
:
5
;
padding
:
10px
;
font-size
:
12px
;
font-family
:
Microsoft
YaHei
;
background
:
rgba
(
255
,
255
,
255
,
1
);
box-shadow
:
0px
2px
5px
0px
rgba
(
170
,
170
,
170
,
0.75
);
border
:
1px
solid
rgb
(
170
,
170
,
170
,
0.65
);
cursor
:
pointer
;
font-size
:
14px
;
padding
:
5px
10px
;
padding
:
5px
20px
;
list-style
:
none
;
}
.tool-copy
li
:hover
{
...
...
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