mirror of https://github.com/openspug/spug
U 批量执行/构建/发布输出内支持Ctrl+c复制
parent
f11f7984ce
commit
294e7e2bc9
|
@ -73,6 +73,13 @@ export default observer(function Console() {
|
|||
term.loadAddon(fitPlugin)
|
||||
term.setOption('fontFamily', 'Source Code Pro, Courier New, Courier, Monaco, monospace, PingFang SC, Microsoft YaHei')
|
||||
term.setOption('theme', {background: '#fafafa', foreground: '#000', selection: '#999'})
|
||||
term.attachCustomKeyEventHandler((arg) => {
|
||||
if (arg.ctrlKey && arg.code === 'KeyC' && arg.type === 'keydown') {
|
||||
document.execCommand('copy')
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
term.open(el.current)
|
||||
term.fit = () => fitPlugin.fit()
|
||||
fitPlugin.fit()
|
||||
|
|
|
@ -17,6 +17,13 @@ function OutView(props) {
|
|||
term.setOption('fontFamily', 'Source Code Pro, Courier New, Courier, Monaco, monospace, PingFang SC, Microsoft YaHei')
|
||||
term.loadAddon(fitPlugin)
|
||||
term.setOption('theme', {background: '#fff', foreground: '#000', selection: '#999'})
|
||||
term.attachCustomKeyEventHandler((arg) => {
|
||||
if (arg.ctrlKey && arg.code === 'KeyC' && arg.type === 'keydown') {
|
||||
document.execCommand('copy')
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
term.open(el.current)
|
||||
fitPlugin.fit()
|
||||
props.setTerm(term)
|
||||
|
|
|
@ -33,6 +33,13 @@ function OutView(props) {
|
|||
term.setOption('disableStdin', true)
|
||||
term.setOption('fontFamily', 'Source Code Pro, Courier New, Courier, Monaco, monospace, PingFang SC, Microsoft YaHei')
|
||||
term.setOption('theme', {background: '#2b2b2b', foreground: '#A9B7C6', cursor: '#2b2b2b'})
|
||||
term.attachCustomKeyEventHandler((arg) => {
|
||||
if (arg.ctrlKey && arg.code === 'KeyC' && arg.type === 'keydown') {
|
||||
document.execCommand('copy')
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
term.loadAddon(fitPlugin)
|
||||
term.open(el.current)
|
||||
fitPlugin.fit()
|
||||
|
|
Loading…
Reference in New Issue