chaos-zhu / easynode

一个多功能Linux服务器WEB终端面板(webSSH&webSFTP). 更新通知TG:
https://t.me/easynode_notify
MIT License
1.37k stars 204 forks source link

终端中选择文字前面会多一个字节,新版中希望增加ctrl + c和ctrl + v #93

Closed gitzixuan closed 1 month ago

gitzixuan commented 3 months ago

终端选择文字前面会多一个字节

捕获

另外在老版本中我增加ctrl + c和ctrl + v
onData() { this.socket.on('output', (str) => { this.term.write(str) }) this.term.onData((key) => { let acsiiCode = key.codePointAt() // console.log(acsiiCode) // if(acsiiCode === 3) return this.handleCtrlC() // ctrl + c if(acsiiCode === 22) return this.handlePaste() // ctrl + v if(acsiiCode === 6) return this.searchBar.show() // ctrl + f this.socket.emit('input', key) }) this.term.attachCustomKeyEventHandler((e) => { // ctrl + v if (e.ctrlKey && e.key === 'v') { document.execCommand('copy') return false } // ctrl + c if (e.ctrlKey && e.key === 'c' && self.term.hasSelection()) { document.execCommand('copy') return false } })

chaos-zhu commented 3 months ago

选中默认copy到粘贴板,右键默认粘贴行为。需要localhost本地或者https环境支持

chaos-zhu commented 3 months ago

多一个字节的问题我优化下去除前后空格

gitzixuan commented 3 months ago

中端个性化背景图片希望改为本地,自己修改个性图片 const backgroundImages = ref([ 'https://wmimg.com/i/1099/2024/08/66c42ff3cd6ab.png', 'https://wmimg.com/i/1099/2024/08/66c42ff3e3f45.png', 'https://wmimg.com/i/1099/2024/08/66c42ff411ffb.png', 'https://wmimg.com/i/1099/2024/08/66c42ff4c5753.png', 'https://wmimg.com/i/1099/2024/08/66c42ff4e8b4d.jpg', 'https://wmimg.com/i/1099/2024/08/66c42ff51ee3a.jpg', 'https://wmimg.com/i/1099/2024/08/66c42ff5db377.png', 'https://wmimg.com/i/1099/2024/08/66c42ff536a64.png', 'https://wmimg.com/i/1099/2024/08/66c42ff51d8dd.png', ]) 修改 import image1 from '@/assets/terminal/01.png' import image2 from '@/assets/terminal/02.png' import image3 from '@/assets/terminal/03.png' import image4 from '@/assets/terminal/04.png' import image5 from '@/assets/terminal/05.png' import image6 from '@/assets/terminal/06.png' import image7 from '@/assets/terminal/07.jpg' import image8 from '@/assets/terminal/08.jpg' import image9 from '@/assets/terminal/09.png' const backgroundImages = ref([ image1, image2, image3, image4, image5, image6, image7, image8, image9, ])

chaos-zhu commented 1 month ago

已支持自定义