移除多个空格
This commit is contained in:
@@ -119,6 +119,7 @@ export default {
|
||||
let str = clipboardReadText()
|
||||
str = str.trim()
|
||||
str = str.replace(/\t|\r\n|\n|\r/g, ' ')
|
||||
str = str.replace(/\s+/g, ' ')
|
||||
let dom_input = this.$refs.dom_input
|
||||
this.text = `${this.text.substring(0, dom_input.selectionStart)}${str}${this.text.substring(dom_input.selectionEnd, this.text.length)}`
|
||||
this.$emit('input', this.text)
|
||||
|
||||
@@ -337,7 +337,6 @@ export default {
|
||||
classList.remove(this.$style.copying)
|
||||
str = str.trim()
|
||||
if (!str.length) return
|
||||
console.log(str)
|
||||
clipboardWriteText(str)
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user