U 文件分发和批量执行适配终端主题设置

pull/517/head
vapao 2022-07-04 10:36:57 +08:00
parent 3c58171167
commit a5a5970001
2 changed files with 6 additions and 2 deletions

View File

@ -18,6 +18,7 @@ import { Terminal } from 'xterm';
import style from './index.module.less';
import { X_TOKEN } from 'libs';
import store from './store';
import gStore from 'gStore';
let gCurrent;
@ -31,7 +32,8 @@ function OutView(props) {
store.tag = ''
gCurrent = current
term.setOption('disableStdin', true)
term.setOption('fontFamily', 'Source Code Pro, Courier New, Courier, Monaco, monospace, PingFang SC, Microsoft YaHei')
term.setOption('fontSize', gStore.terminal.fontSize)
term.setOption('fontFamily', gStore.terminal.fontFamily)
term.setOption('theme', {background: '#2b2b2b', foreground: '#A9B7C6', cursor: '#2b2b2b'})
term.attachCustomKeyEventHandler((arg) => {
if (arg.ctrlKey && arg.code === 'KeyC' && arg.type === 'keydown') {

View File

@ -18,6 +18,7 @@ import { Terminal } from 'xterm';
import style from './index.module.less';
import { X_TOKEN, http } from 'libs';
import store from './store';
import gStore from 'gStore';
let gCurrent;
@ -31,7 +32,8 @@ function OutView(props) {
store.tag = ''
gCurrent = current
term.setOption('disableStdin', true)
term.setOption('fontFamily', 'Source Code Pro, Courier New, Courier, Monaco, monospace, PingFang SC, Microsoft YaHei')
term.setOption('fontSize', gStore.terminal.fontSize)
term.setOption('fontFamily', gStore.terminal.fontFamily)
term.setOption('theme', {background: '#2b2b2b', foreground: '#A9B7C6', cursor: '#2b2b2b'})
term.attachCustomKeyEventHandler((arg) => {
if (arg.ctrlKey && arg.code === 'KeyC' && arg.type === 'keydown') {