移除多个空格
parent
a9e3723764
commit
5bff74e7a9
|
@ -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
|
// https://github.com/electron/electron/issues/18397
|
||||||
app.allowRendererProcessReuse = true
|
app.allowRendererProcessReuse = !isDev
|
||||||
|
|
||||||
const { getWindowSizeInfo, parseEnv } = require('./utils')
|
const { getWindowSizeInfo, parseEnv } = require('./utils')
|
||||||
|
|
||||||
|
@ -27,8 +29,6 @@ require('./events')
|
||||||
const autoUpdate = require('./utils/autoUpdate')
|
const autoUpdate = require('./utils/autoUpdate')
|
||||||
const { isLinux, isMac } = require('../common/utils')
|
const { isLinux, isMac } = require('../common/utils')
|
||||||
|
|
||||||
const isDev = process.env.NODE_ENV !== 'production'
|
|
||||||
|
|
||||||
|
|
||||||
let mainWindow
|
let mainWindow
|
||||||
let winURL
|
let winURL
|
||||||
|
|
|
@ -119,6 +119,7 @@ export default {
|
||||||
let str = clipboardReadText()
|
let str = clipboardReadText()
|
||||||
str = str.trim()
|
str = str.trim()
|
||||||
str = str.replace(/\t|\r\n|\n|\r/g, ' ')
|
str = str.replace(/\t|\r\n|\n|\r/g, ' ')
|
||||||
|
str = str.replace(/\s+/g, ' ')
|
||||||
let dom_input = this.$refs.dom_input
|
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.text = `${this.text.substring(0, dom_input.selectionStart)}${str}${this.text.substring(dom_input.selectionEnd, this.text.length)}`
|
||||||
this.$emit('input', this.text)
|
this.$emit('input', this.text)
|
||||||
|
|
|
@ -337,7 +337,6 @@ export default {
|
||||||
classList.remove(this.$style.copying)
|
classList.remove(this.$style.copying)
|
||||||
str = str.trim()
|
str = str.trim()
|
||||||
if (!str.length) return
|
if (!str.length) return
|
||||||
console.log(str)
|
|
||||||
clipboardWriteText(str)
|
clipboardWriteText(str)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue