{{ it.cmd }} {{ it.des }}
30 | -
37 |
{{ it.cmd }}
38 | - {{ it.des }} 39 |
├── design
├── vue.png
└── logo.html
├── shortcut
├── logo.png
├── dragging.gif
├── ele-info.png
└── vue-web-terminal.gif
├── tsconfig.node.json
├── .github
└── ISSUE_TEMPLATE
│ ├── Feature or Suggestion.md
│ └── Bug.md
├── vue-web-terminal.iml
├── .npmignore
├── index.html
├── test
├── main.ts
└── App.vue
├── src
├── components
│ ├── TViewerCode.vue
│ ├── TViewerNormal.vue
│ ├── TViewerTable.vue
│ ├── TViewerJson.vue
│ ├── TEditor.vue
│ ├── THelpBox.vue
│ └── THeader.vue
├── index.ts
├── env.d.ts
├── common
│ ├── configuration.ts
│ ├── api
│ │ └── index.ts
│ ├── store
│ │ └── index.ts
│ └── util.ts
├── css
│ ├── scrollbar.css
│ ├── theme
│ │ ├── light.css
│ │ └── dark.css
│ ├── ansi.css
│ └── style.css
├── ansi
│ ├── ansi-256-colors.json
│ └── index.ts
├── types
│ └── index.ts
└── Terminal.vue
├── .gitignore
├── tsconfig.json
├── package.js
├── publish.py
├── package.json
├── vite.config.ts
├── README_ZH.md
├── README.md
└── LICENSE
/design/vue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tzfun/vue-web-terminal/HEAD/design/vue.png
--------------------------------------------------------------------------------
/shortcut/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tzfun/vue-web-terminal/HEAD/shortcut/logo.png
--------------------------------------------------------------------------------
/shortcut/dragging.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tzfun/vue-web-terminal/HEAD/shortcut/dragging.gif
--------------------------------------------------------------------------------
/shortcut/ele-info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tzfun/vue-web-terminal/HEAD/shortcut/ele-info.png
--------------------------------------------------------------------------------
/shortcut/vue-web-terminal.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tzfun/vue-web-terminal/HEAD/shortcut/vue-web-terminal.gif
--------------------------------------------------------------------------------
/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "skipLibCheck": true,
5 | "module": "ESNext",
6 | "moduleResolution": "bundler",
7 | "allowSyntheticDefaultImports": true
8 | },
9 | "include": ["vite.config.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/Feature or Suggestion.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature or Suggestion
3 | about: Provide some better suggestions or optimizations
4 | title: ''
5 | labels: enhancement
6 | assignees: tzfun
7 |
8 | ---
9 |
10 | **Feature or optimization description**
11 |
12 | **Applicable scene**
13 |
--------------------------------------------------------------------------------
/vue-web-terminal.iml:
--------------------------------------------------------------------------------
1 |
2 |
{{ message.content }}
14 | | {{ it }} | 16 |
| 21 | 22 | | 23 |
Usage: {{ content.usage }}
{{ it.cmd }} {{ it.des }}
30 | {{ it.cmd }}
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
5 |
5 |
397 | * methods: {
398 | * _someMethod: _debounce(function () {
399 | * // ...
400 | * }, 100)
401 | * }
402 | *
403 | *
404 | * @param fn
405 | * @param delay
406 | * @return {(function(): void)|*}
407 | * @private
408 | */
409 | export function _debounce(fn: Function, delay: number = 200) {
410 | let timer = null;
411 | return function () {
412 | let _this = this
413 | let args = arguments
414 | if (timer) {
415 | clearTimeout(timer)
416 | }
417 | timer = setTimeout(function () {
418 | fn.apply(_this, args);
419 | }, delay);
420 | };
421 | }
422 |
423 | /**
424 | * 将配置值转为像素度单位值
425 | * @param value {number | string} 配置值,如果为number值则单位默认为px,如果为string只支持百分比和px单位配置
426 | * @param parentPixel 父元素的像素度,用于百分比计算
427 | * @param defaultValue 默认值,如果解析失败则使用默认值
428 | */
429 | export function _parsePixelFromValue(value: number | string, parentPixel: number, defaultValue: number): number {
430 | let pixel: number
431 | if (value) {
432 | if (typeof value === 'string') {
433 | if (value.endsWith("%")) {
434 | pixel = (parentPixel * (parseFloat(value) / 100))
435 | } else if (value.endsWith("px")) {
436 | pixel = parseFloat(value)
437 | } else {
438 | pixel = parseFloat(value)
439 | }
440 | } else if (typeof value === 'number') {
441 | pixel = value
442 | } else {
443 | pixel = defaultValue
444 | }
445 | } else {
446 | pixel = defaultValue
447 | }
448 | return pixel
449 | }
450 |
451 | export function _hash(str: string) {
452 | // Step 1: Initialize hash value
453 | let hash = 5381;
454 |
455 | // Step 2: Compute hash
456 | for (let i = 0; i < str.length; i++) {
457 | hash = (hash * 33) ^ str.charCodeAt(i);
458 | }
459 |
460 | // Step 3: Convert hash to 32-bit unsigned integer
461 | hash = hash >>> 0;
462 |
463 | // Step 4: Convert hash to hexadecimal string
464 | return hash.toString(16);
465 | }
466 |
--------------------------------------------------------------------------------
/src/css/style.css:
--------------------------------------------------------------------------------
1 | :root {
2 | /*限定字体高度*/
3 | --t-font-height: 19px;
4 | /*限定字体大小*/
5 | --t-font-size: 16px;
6 | --t-cmd-tips-border-radius: 5px;
7 | }
8 |
9 | .t-log-box, .t-cmd-line {
10 | margin-block-start: 0;
11 | margin-block-end: 0;
12 | margin-inline-start: 0;
13 | margin-inline-end: 0;
14 | }
15 |
16 | .t-log-box {
17 | display: block;
18 | position: relative;
19 | line-height: var(--t-font-height);
20 | }
21 |
22 | .t-container {
23 | position: relative;
24 | margin: 0;
25 | padding: 0;
26 | border-radius: 15px;
27 | background-color: var(--t-main-background-color);
28 | box-shadow: var(--t-window-box-shadow);
29 | -moz-box-shadow: var(--t-window-box-shadow);
30 | -webkit-box-shadow: var(--t-window-box-shadow);
31 | -o-box-shadow: var(--t-window-box-shadow);
32 | }
33 |
34 | .t-header-container {
35 | position: relative;
36 | z-index: 2;
37 | top: 0;
38 | right: 0;
39 | left: 0;
40 | }
41 |
42 | .t-header {
43 | text-align: center;
44 | padding: 2px;
45 | background-color: var(--t-header-background-color);
46 | }
47 |
48 | .t-header-title {
49 | font-size: calc(var(--t-font-size) + 2px);
50 | font-weight: bold;
51 | margin: 5px;
52 | height: var(--t-font-height);
53 | line-height: var(--t-font-height);
54 | letter-spacing: 1px;
55 | color: var(--t-header-font-color);
56 | display: inline-block;
57 | cursor: pointer;
58 | text-shadow: 0 0 20px #41454a;
59 | }
60 |
61 | .t-header ul.t-shell-dots {
62 | position: absolute;
63 | top: 5px;
64 | left: 8px;
65 | padding-left: 0;
66 | margin: 0;
67 | }
68 |
69 | .t-header ul.t-shell-dots li {
70 | display: inline-block;
71 | width: 16px;
72 | height: 16px;
73 | border-radius: 10px;
74 | margin-left: 6px;
75 | margin-top: 4px;
76 | line-height: 16px;
77 | cursor: pointer;
78 | }
79 |
80 | .shell-dot-item {
81 | position: relative;
82 | }
83 |
84 | .t-header ul .t-shell-dots-red {
85 | background-color: #f14444;
86 | }
87 |
88 | .t-header ul .t-shell-dots-yellow {
89 | background-color: #f7db60;
90 | }
91 |
92 | .t-header ul .t-shell-dots-green {
93 | background-color: #23bd65;
94 | }
95 |
96 | .t-shell-dot {
97 | opacity: 0;
98 | transition: opacity 0.2s ease;
99 | -moz-transition: opacity 0.2s ease;
100 | -ms-transition: opacity 0.2s ease;
101 | -webkit-transition: opacity 0.2s ease;
102 | -o-transition: opacity 0.2s ease;
103 | margin-bottom: 0;
104 | position: absolute;
105 | left: 50%;
106 | margin-left: -5px;
107 | top: 50%;
108 | margin-top: -5px;
109 | }
110 |
111 | .t-shell-dots:hover .t-shell-dot {
112 | opacity: 1;
113 | }
114 |
115 | .t-shell-pin-icon {
116 | filter: drop-shadow(5px 30px 5px rgba(26, 58, 70, 0.8));
117 | -ms-filter: drop-shadow(5px 30px 5px rgba(26, 58, 70, 0.8));
118 | -webkit-filter: drop-shadow(5px 30px 5px rgba(26, 58, 70, 0.8));
119 | }
120 |
121 | .t-window,
122 | .t-ask-input,
123 | .t-window p,
124 | .t-window div,
125 | .t-crude-font {
126 | font-size: var(--t-font-size);
127 | font-family: Monaco, "Lucida Console", monospace;
128 | }
129 |
130 | .t-window {
131 | position: absolute;
132 | top: 0;
133 | left: 0;
134 | right: 0;
135 | overflow: auto;
136 | z-index: 1;
137 | max-height: none;
138 | min-height: 140px;
139 | padding: 0 0 0 20px;
140 | font-weight: 400;
141 | cursor: text;
142 | background-color: var(--t-main-background-color);
143 | color: var(--t-main-font-color);
144 | }
145 |
146 | .t-window p {
147 | overflow-wrap: break-word;
148 | word-break: break-all;
149 | }
150 |
151 | .t-window p .cmd {
152 | line-height: 24px;
153 | }
154 |
155 | @keyframes cursor-flash {
156 | 0%, 100% {
157 | opacity: 0;
158 | }
159 | 50% {
160 | opacity: 1;
161 | }
162 | }
163 |
164 | .t-window .t-cursor {
165 | position: absolute;
166 | }
167 |
168 | .t-window .t-cursor-blink {
169 | animation: cursor-flash 1s infinite;
170 | -webkit-animation: cursor-flash 1s infinite;
171 | -o-animation: cursor-flash 1s infinite;
172 | -moz-animation: cursor-flash 1s infinite;
173 | }
174 |
175 | .t-window .t-cursor-block {
176 | background-color: var(--t-cursor-color);
177 | }
178 |
179 | .t-window .t-cursor-underline::before {
180 | display: block;
181 | position: absolute;
182 | background-color: var(--t-cursor-color);
183 | width: 100%;
184 | height: 3px;
185 | z-index: 100;
186 | bottom: 0;
187 | left: 0;
188 | content: " ";
189 | }
190 |
191 | .t-window .t-cursor-bar::before {
192 | display: block;
193 | position: absolute;
194 | background-color: var(--t-cursor-color);
195 | width: 2px;
196 | height: 100%;
197 | z-index: 100;
198 | top: 0;
199 | left: 0;
200 | content: " ";
201 | }
202 |
203 | .t-window .t-cursor-none {
204 | display: none;
205 | }
206 |
207 | .t-a {
208 | color: var(--t-link-color);
209 | }
210 |
211 | .t-a:hover {
212 | color: var(--t-link-hover-color);
213 | }
214 |
215 | .t-ask-input {
216 | border: none;
217 | max-width: 300px;
218 | background: none;
219 | outline: none;
220 | padding: 0;
221 | display: inline-block;
222 | color: var(--t-main-font-color);
223 | }
224 |
225 | .t-ask-input:focus, .t-ask-input:focus-visible {
226 | border: none;
227 | outline: none;
228 | }
229 |
230 | .t-cmd-input {
231 | position: relative;
232 | border: none;
233 | width: 1px;
234 | height: 0;
235 | opacity: 0;
236 | cursor: text;
237 | padding: 1px 2px;
238 | -webkit-writing-mode: horizontal-tb !important;
239 | text-rendering: auto;
240 | letter-spacing: normal;
241 | word-spacing: normal;
242 | text-transform: none;
243 | text-indent: 0;
244 | text-shadow: none;
245 | display: inline-block;
246 | text-align: start;
247 | appearance: textfield;
248 | -webkit-rtl-ordering: logical;
249 | border-image: initial;
250 | word-wrap: break-word;
251 | margin: 0;
252 | background-color: var(--t-main-background-color);
253 | }
254 |
255 | .t-content-normal .success,
256 | .t-content-normal .error,
257 | .t-content-normal .warning,
258 | .t-content-normal .info,
259 | .t-content-normal .system {
260 | padding: 0 3px;
261 | color: var(--t-tag-font-color);
262 | }
263 |
264 | .t-content-normal .success {
265 | background-color: #27ae60;
266 | }
267 |
268 | .t-content-normal .error {
269 | background-color: #c0392b;
270 | }
271 |
272 | .t-content-normal .warning {
273 | background-color: #f39c12;
274 | }
275 |
276 | .t-content-normal .info {
277 | background-color: #2980b9;
278 | }
279 |
280 | .t-content-normal .system {
281 | background-color: #8697a2;
282 | }
283 |
284 | .t-crude-font {
285 | font-weight: 600;
286 | }
287 |
288 | .t-flag {
289 | opacity: 0;
290 | }
291 |
292 | .t-last-line {
293 | font-size: 0;
294 | word-spacing: 0;
295 | letter-spacing: 0;
296 | position: relative;
297 | margin-bottom: 15px;
298 | line-height: var(--t-font-height);
299 | }
300 |
301 | /*手机*/
302 | @media screen and (max-width: 768px ) {
303 | .t-window {
304 | padding: 0 0 0 15px;
305 | }
306 | }
307 |
308 | /*平板*/
309 | @media screen and (max-width: 992px) and (min-width: 768.1px) {
310 |
311 | }
312 |
313 | .t-cmd-line {
314 | font-size: 0;
315 | line-height: var(--t-font-height);
316 | }
317 |
318 | .t-cmd-line-content {
319 | font-size: var(--t-font-size);
320 | word-break: break-all;
321 | white-space: break-spaces;
322 | }
323 |
324 | .t-cmd-key {
325 | font-weight: 700;
326 | color: var(--t-cmd-key-color);
327 | }
328 |
329 | .t-cmd-arg {
330 | color: var(--t-cmd-arg-color);
331 | }
332 |
333 | .t-cmd-splitter {
334 | color: var(--t-cmd-splitter-color);
335 | }
336 |
337 | .t-help-list {
338 | margin: 0;
339 | list-style: none;
340 | padding-left: 0;
341 | display: inline-grid;
342 | display: -moz-inline-grid;
343 | display: -ms-inline-grid;
344 | }
345 |
346 | .t-help-list li {
347 | margin: 3px 0;
348 | }
349 |
350 | .t-cmd-help {
351 | position: absolute;
352 | top: 15px;
353 | right: 12px;
354 | z-index: 99;
355 | max-width: 50%;
356 | padding: 5px;
357 | overflow: auto;
358 | max-height: calc(100% - 60px);
359 | background-color: var(--t-cmd-help-background-color);
360 | color: var(--t-main-font-color);
361 | box-shadow: var(--t-cmd-help-box-shadow);
362 | }
363 |
364 | .t-cmd-help code {
365 | font-size: var(--t-font-size);
366 | border: none;
367 | padding: 2px 5px 2px 5px;
368 | background-color: var(--t-cmd-help-code-background-color) !important;
369 | }
370 |
371 | .t-cmd-help-eg {
372 | float: left;
373 | width: 30px;
374 | display: flex;
375 | font-size: var(--t-font-size);
376 | line-height: var(--t-font-height);
377 | }
378 |
379 | .t-cmd-help-example {
380 | float: left;
381 | width: calc(100% - 30px);
382 | display: flex
383 | }
384 |
385 | .t-cmd-help-des {
386 | margin-bottom: 10px;
387 | }
388 |
389 | .t-cmd-help-des-item {
390 | font-size: var(--t-font-size);
391 | }
392 |
393 | .t-pre-numbering {
394 | margin-top: 0;
395 | position: absolute;
396 | top: 0;
397 | left: -30px;
398 | width: 30px;
399 | text-align: center;
400 | padding: 1em 0;
401 | }
402 |
403 | .t-pre-numbering li {
404 | list-style: none;
405 | font-size: 1em;
406 | }
407 |
408 | .t-window pre {
409 | position: relative;
410 | margin: 0;
411 | overflow: auto;
412 | }
413 |
414 | .t-example-ul {
415 | padding: 0 0 0 10px;
416 | margin: 0;
417 | list-style: none;
418 | }
419 |
420 | .t-table {
421 | max-width: 100%;
422 | overflow: auto;
423 | padding: 0;
424 | margin: 0;
425 | }
426 |
427 | .t-border-dashed {
428 | border-collapse: collapse;
429 | border: var(--t-table-border);
430 | }
431 |
432 | .t-table thead {
433 | font-weight: 600;
434 | }
435 |
436 | .t-table, .t-table tr, .t-table td, .t-table tbody, .t-table thead {
437 | margin: 0;
438 | padding: 15px;
439 | }
440 |
441 | .t-code-inline {
442 | color: var(--t-code-inline-font-color);
443 | font-weight: 600;
444 | }
445 |
446 | .t-code {
447 | position: relative;
448 | max-height: 500px;
449 | overflow: auto;
450 | }
451 |
452 | .t-vue-codemirror div,
453 | .t-vue-highlight div {
454 | font-size: var(--t-font-size);
455 | }
456 |
457 | .t-code .t-vue-codemirror .vue-codemirror .CodeMirror {
458 | height: unset;
459 | border: none;
460 | }
461 |
462 | .t-text-editor-container {
463 | position: absolute;
464 | left: 0;
465 | top: 0;
466 | width: 100%;
467 | height: 100%;
468 | z-index: 1;
469 | }
470 |
471 | .t-text-editor {
472 | width: calc(100% - 10px);
473 | height: calc(100% - 35px);
474 | overflow: auto;
475 | resize: none;
476 | margin: 0;
477 | padding: 0 5px;
478 | border: none;
479 | font-size: var(--t-font-size);
480 | color: var(--t-main-font-color);
481 | background-color: var(--t-main-background-color);
482 | }
483 |
484 | .t-text-editor:focus-visible, .t-text-editor:focus {
485 | outline: none;
486 | outline-offset: unset;
487 | }
488 |
489 | .t-text-editor-floor {
490 | position: absolute;
491 | height: 35px;
492 | width: 100%;
493 | bottom: 0;
494 | left: 0;
495 | background-color: var(--t-text-editor-floor-background-color);
496 | }
497 |
498 | .t-text-editor-floor-btn {
499 | border: none;
500 | outline: none;
501 | margin-top: 10px;
502 | cursor: pointer;
503 | background-color: rgba(0, 0, 0, 0);
504 | }
505 |
506 | .t-close-btn {
507 | color: var(--t-text-editor-floor-close-btn-color);
508 | }
509 |
510 | .t-save-btn {
511 | color: var(--t-text-editor-floor-save-btn-color);
512 | }
513 |
514 | .t-text-editor-floor-btn:hover {
515 | color: var(--t-text-editor-floor-btn-hover-color);
516 | }
517 |
518 | .t-disable-select {
519 | user-select: none;
520 | -moz-user-select: none;
521 | -webkit-user-select: none;
522 | -ms-user-select: none;
523 | -khtml-user-selece: none;
524 | }
525 |
526 | .t-point {
527 | width: var(--t-font-height);
528 | height: var(--t-font-height);
529 | background-color: rgba(0, 0, 0, 0);
530 | position: absolute;
531 | z-index: 100;
532 | }
533 |
534 | .t-point-lt {
535 | left: calc(0px - var(--t-font-height) / 2);
536 | top: calc(0px - var(--t-font-height) / 2);
537 | cursor: nwse-resize;
538 | }
539 |
540 | .t-point-rt {
541 | left: calc(100% - var(--t-font-height) / 2);
542 | top: calc(0px - var(--t-font-height) / 2);
543 | cursor: nesw-resize;
544 | }
545 |
546 | .t-point-lb {
547 | left: calc(0px - var(--t-font-height) / 2);
548 | top: calc(100% - var(--t-font-height) / 2);
549 | cursor: nesw-resize;
550 | }
551 |
552 | .t-point-rb {
553 | left: calc(100% - var(--t-font-height) / 2);
554 | top: calc(100% - var(--t-font-height) / 2);
555 | cursor: nwse-resize;
556 | }
557 |
558 | .t-code-default {
559 | background-color: var(--t-code-default-background-color);
560 | }
561 |
562 | .t-log-box-hover-script:hover {
563 | background-color: var(--t-log-box-hover-script-background-color);
564 | }
565 |
566 | .t-log-box-folded:hover {
567 | background-color:var(--t-log-box-folded-hover-background-color);
568 | }
569 |
570 | .t-log-box-folded {
571 | height: var(--t-font-height);
572 | overflow-y: clip;
573 | background-color: var(--t-log-box-folded-background-color);
574 | cursor: pointer;
575 | }
576 |
577 | .t-log-fold-icon {
578 | position: absolute;
579 | width: 10px;
580 | height: 10px;
581 | left: -17px;
582 | top: 4px;
583 | border: 1px solid var(--t-log-fold-icon-border-color);
584 | text-align: center;
585 | line-height: 9px;
586 | background-color: var(--t-log-fold-icon-background-color);
587 | color: var(--t-log-fold-icon-color);
588 | cursor: pointer;
589 | user-select: none;
590 | z-index: 100;
591 | }
592 |
593 | .t-log-fold-icon-active {
594 | background-color: var(--t-log-fold-icon-active-background-color);
595 | color: var(--t-log-fold-icon-active-color);
596 | }
597 |
598 | .t-log-fold-line {
599 | position: absolute;
600 | height: calc(100% - 10px);
601 | width: 1px;
602 | background-color: var(--t-log-fold-line-color);
603 | left: -12px;
604 | top: 10px;
605 | }
606 |
607 | .t-cmd-tips {
608 | --t-cmd-tips-box-shadow: 5px 5px 15px 0 rgba(0, 0, 0, 0.3);
609 |
610 | position: absolute;
611 | display: block;
612 | z-index: 100;
613 | background-color: var(--t-cmd-tips-background-color);
614 | border-radius: var(--t-cmd-tips-border-radius);
615 | color: var(--t-cmd-tips-font-color);
616 | -ms-overflow-y: auto;
617 | cursor: context-menu;
618 | font-weight: normal;
619 | box-shadow: var(--t-cmd-tips-box-shadow);
620 | -moz-box-shadow: var(--t-cmd-tips-box-shadow);
621 | -webkit-box-shadow: var(--t-cmd-tips-box-shadow);
622 | -o-box-shadow: var(--t-cmd-tips-box-shadow);
623 | font-family: system-ui;
624 | }
625 |
626 | .t-cmd-tips-items {
627 | display: block;
628 | min-width: 280px;
629 | max-width: 500px;
630 | max-height: 200px;
631 | overflow-y: auto;
632 | padding: 5px;
633 | }
634 |
635 | .t-cmd-tips-footer {
636 | display: block;
637 | width: 100%;
638 | padding: 5px 0;
639 | text-indent: 6px;
640 | line-height: var(--t-font-height);
641 | background-color: var(--t-cmd-tips-footer-background-color);
642 | color: var(--t-cmd-tips-footer-font-color);
643 | font-size: 12px;
644 | border-bottom-left-radius: var(--t-cmd-tips-border-radius);
645 | -webkit-border-bottom-left-radius: var(--t-cmd-tips-border-radius);
646 | border-bottom-right-radius: var(--t-cmd-tips-border-radius);
647 | -webkit-border-bottom-right-radius: var(--t-cmd-tips-border-radius);
648 | }
649 |
650 | .t-cmd-tips-item {
651 | display: block;
652 | padding: 5px 8px;
653 | text-overflow:ellipsis;
654 | overflow:hidden;
655 | text-wrap: nowrap;
656 | color: var(--t-cmd-tips-des-font-color);
657 | border-radius: 5px;
658 | }
659 |
660 | .t-cmd-tips-item-first {
661 | border-top-left-radius: var(--t-cmd-tips-border-radius);
662 | -webkit-border-top-left-radius: var(--t-cmd-tips-border-radius);
663 | border-top-right-radius: var(--t-cmd-tips-border-radius);
664 | -webkit-border-top-right-radius: var(--t-cmd-tips-border-radius);
665 | }
666 |
667 | .t-cmd-tips-item-active {
668 | background-color: var(--t-cmd-tips-active-background-color);
669 | }
670 |
671 | .t-cmd-tips-content {
672 | font-weight: bold;
673 | color: var(--t-cmd-tips-content-font-color);
674 | cursor: context-menu;
675 | user-select: none;
676 | }
677 |
678 | .t-cmd-tips-des {
679 | color: var(--t-cmd-tips-des-font-color);
680 | margin-left: 8px;
681 | cursor: context-menu;
682 | user-select: none;
683 | }
684 |
685 | /*--------------------------json viewer style------------------------*/
686 | .t-json-container .jv-container.jv-light {
687 | border: none;
688 | background-color: var(--t-json-background-color);
689 | color: var(--t-main-font-color);
690 | }
691 |
692 | .t-json-container .jv-container .jv-code,
693 | .t-json-container .jv-container .jv-code.open {
694 | padding-bottom: 0;
695 | overflow: hidden;
696 | }
697 |
698 | .t-json-container .jv-container {
699 | display: inline-block;
700 | min-width: 300px;
701 | }
702 |
703 | .t-json-container .jv-container.jv-light .jv-item.jv-array,
704 | .t-json-container .jv-container.jv-light .jv-item.jv-object {
705 | color: var(--t-json-value-obj-color);
706 | }
707 |
708 | .t-json-container .jv-container.jv-light .jv-key {
709 | color: var(--t-main-font-color);
710 | }
711 |
712 | .t-json-container .jv-container.jv-light .jv-item.jv-boolean {
713 | color: var(--t-json-value-bool-color);
714 | }
715 |
716 | .t-json-container .jv-container.jv-light .jv-item.jv-number {
717 | color: var(--t-json-value-number-color);
718 | }
719 |
720 | .t-json-container .jv-container.jv-light .jv-ellipsis {
721 | color: var(--t-main-font-color);
722 | background-color: var(--t-json-ellipsis-background-color);
723 | }
724 |
725 | .t-json-container .jv-container .jv-more:after {
726 | background: var(--t-json-more-background-webkit);
727 | background: var(--t-json-more-background);
728 | }
729 |
730 | .t-json-deep-selector {
731 | margin-top: 8px;
732 | width: 75px;
733 | position: absolute;
734 | margin-left: -150px;
735 | font-size: var(--t-font-size);
736 | border-radius: 2px;
737 | cursor: pointer;
738 | border: 1px solid var(--t-json-deep-selector-border-color);
739 | }
740 |
741 | .t-json-deep-selector:focus,
742 | .t-json-deep-selector:focus-visible {
743 | outline: none;
744 | }
745 |
746 | /*--------------------------selection style------------------------*/
747 | .t-window div::selection,
748 | .t-window a::selection,
749 | .t-window span::selection,
750 | .t-window li::selection,
751 | .t-window p::selection,
752 | .t-window code::selection,
753 | .t-window td::selection,
754 | .t-window th::selection,
755 | .t-window br::selection {
756 | color: var(--t-selection-font-color);
757 | background-color: var(--t-selection-background-color);
758 | }
759 |
--------------------------------------------------------------------------------
/src/Terminal.vue:
--------------------------------------------------------------------------------
1 |
2076 |
2077 |
2078 | 2188 | 2189 | {{ context }} 2190 | {{ contextSuffix }} 2191 | 2196 | 2200 | 2201 | 2206 | 2207 | 2208 | 2209 | 2210 | 2213 | 2214 | 2229 |
2230 |