移除多个空格

pull/166/head
lyswhut 2020-02-10 18:12:38 +08:00
parent a9e3723764
commit 5bff74e7a9
3 changed files with 4 additions and 4 deletions

View File

@ -15,8 +15,10 @@ app.on('second-instance', (event, argv, cwd) => {
}
})
const isDev = process.env.NODE_ENV !== 'production'
// https://github.com/electron/electron/issues/18397
app.allowRendererProcessReuse = true
app.allowRendererProcessReuse = !isDev
const { getWindowSizeInfo, parseEnv } = require('./utils')
@ -27,8 +29,6 @@ require('./events')
const autoUpdate = require('./utils/autoUpdate')
const { isLinux, isMac } = require('../common/utils')
const isDev = process.env.NODE_ENV !== 'production'
let mainWindow
let winURL

View File

@ -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)

View File

@ -337,7 +337,6 @@ export default {
classList.remove(this.$style.copying)
str = str.trim()
if (!str.length) return
console.log(str)
clipboardWriteText(str)
})
},