Commit e7754390 authored by 华国豪's avatar 华国豪 🙄

111

parent 4800d9fb
...@@ -11,9 +11,14 @@ ...@@ -11,9 +11,14 @@
@input="changeTxt" @input="changeTxt"
@focus="lock=true" @focus="lock=true"
@blur="lock=false" @blur="lock=false"
@contextmenu="copyBox"
id="msgEditorBox" id="msgEditorBox"
draggable="false" draggable="false"
></div> ></div>
<div class="tool-copy" :style="{'top': toolTop+'px','left': toolLeft+'px'}" v-if="toolShow">
<!-- <li>复制</li> -->
<li @click="toolPaste">粘贴</li>
</div>
</at> </at>
</template> </template>
<script> <script>
...@@ -41,7 +46,10 @@ export default { ...@@ -41,7 +46,10 @@ export default {
innerText: this.child.txt, innerText: this.child.txt,
uploadFile: [], uploadFile: [],
lock: false, lock: false,
showMember:[] showMember:[],
toolTop: 0,
toolLeft: 0,
toolShow: false,
}; };
}, },
watch: { watch: {
...@@ -196,6 +204,15 @@ export default { ...@@ -196,6 +204,15 @@ export default {
let myInterval = window.setInterval(this.updateClipboard, 500); let myInterval = window.setInterval(this.updateClipboard, 500);
}, },
methods: { 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) { changeTxt: function(e) {
this.child.txt = document.querySelector('#msgEditorBox').innerText; this.child.txt = document.querySelector('#msgEditorBox').innerText;
}, },
...@@ -365,4 +382,24 @@ export default { ...@@ -365,4 +382,24 @@ export default {
white-space: nowrap; white-space: nowrap;
text-align: center; 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> </style>
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 to comment