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

111

parent 4800d9fb
......@@ -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>
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