Update Search.vue
This commit is contained in:
parent
a4d3c06119
commit
c43a24a3c7
@ -408,12 +408,16 @@ export default {
|
|||||||
this.isShowListAddMultiple = false
|
this.isShowListAddMultiple = false
|
||||||
},
|
},
|
||||||
handleContextMenu(event) {
|
handleContextMenu(event) {
|
||||||
if (!event.target.classList.contains('select')) return
|
const selection = window.getSelection();
|
||||||
|
if (!event.target.classList.contains("select") ||
|
||||||
|
!selection.toString()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
event.stopImmediatePropagation()
|
event.stopImmediatePropagation()
|
||||||
let classList = this.$refs.dom_scrollContent.classList
|
let classList = this.$refs.dom_scrollContent.classList
|
||||||
classList.add(this.$style.copying)
|
classList.add(this.$style.copying)
|
||||||
window.requestAnimationFrame(() => {
|
window.requestAnimationFrame(() => {
|
||||||
let str = window.getSelection().toString()
|
let str = selection.toString()
|
||||||
classList.remove(this.$style.copying)
|
classList.remove(this.$style.copying)
|
||||||
str = str.trim()
|
str = str.trim()
|
||||||
if (!str.length) return
|
if (!str.length) return
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user