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
e7754390
Commit
e7754390
authored
Sep 26, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
4800d9fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
1 deletion
+38
-1
contenteditor.vue
src/renderer/components/tools/contenteditor.vue
+38
-1
No files found.
src/renderer/components/tools/contenteditor.vue
View file @
e7754390
...
...
@@ -11,9 +11,14 @@
@
input=
"changeTxt"
@
focus=
"lock=true"
@
blur=
"lock=false"
@
contextmenu=
"copyBox"
id=
"msgEditorBox"
draggable=
"false"
></div>
<div
class=
"tool-copy"
:style=
"{'top': toolTop+'px','left': toolLeft+'px'}"
v-if=
"toolShow"
>
<!-- <li>复制</li> -->
<li
@
click=
"toolPaste"
>
粘贴
</li>
</div>
</at>
</template>
<
script
>
...
...
@@ -41,7 +46,10 @@ export default {
innerText
:
this
.
child
.
txt
,
uploadFile
:
[],
lock
:
false
,
showMember
:[]
showMember
:[],
toolTop
:
0
,
toolLeft
:
0
,
toolShow
:
false
,
};
},
watch
:
{
...
...
@@ -196,6 +204,15 @@ export default {
let myInterval = window.setInterval(this.updateClipboard, 500);
},
methods: {
toolPaste: function (e) {
let clipboardData = 1
console.log(e)
},
copyBox: function (e) {
this.toolTop = e.offsetY
this.toolLeft = e.offsetX
this.toolShow = true
},
changeTxt: function(e) {
this.child.txt = document.querySelector('#msgEditorBox').innerText;
},
...
...
@@ -365,4 +382,24 @@ export default {
white-space
:
nowrap
;
text-align
:
center
;
}
.tool-copy
{
position
:
absolute
;
top
:
0
;
left
:
0
;
}
.tool-copy
li
{
z-index
:
5
;
padding
:
10px
;
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
;
list-style
:
none
;
}
.tool-copy
li
:hover
{
background
:
#eeeeee
;
}
</
style
>
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