diff --git a/plugin/preload.js b/plugin/preload.js index ca2c335..7ebba0f 100644 --- a/plugin/preload.js +++ b/plugin/preload.js @@ -463,7 +463,7 @@ window.runCodeInSandbox = (code, callback, addVars = {}) => { sandbox.console = { log: (...stdout) => { console.log(stdout); - callback(parseStdout(stdout), null) + callback(stdout, null) }, error: (...stderr) => { callback(null, parseStdout(stderr)) diff --git a/src/components/CommandRunResult.vue b/src/components/CommandRunResult.vue index 749e3b2..610220a 100644 --- a/src/components/CommandRunResult.vue +++ b/src/components/CommandRunResult.vue @@ -2,7 +2,7 @@
- + this.resultMaxLength) - content = - content.slice(0, this.resultMaxLength - 100) + - `\n\n...\n${ - contlength - this.resultMaxLength - 100 - } 字省略\n...\n\n` + - content.slice(contlength - 100); - let pretreatment = action(content); - pretreatment && (this.runResult += pretreatment); + // let contlength = content?.length || 0; + // if (contlength > this.resultMaxLength) + // content = + // content.slice(0, this.resultMaxLength - 100) + + // `\n\n...\n${ + // contlength - this.resultMaxLength - 100 + // } 字省略\n...\n\n` + + // content.slice(contlength - 100); + // let pretreatment = action(content); + // pretreatment && (this.runResult += pretreatment); + this.runResult = this.runResult.concat(content); this.outputAutoHeight(this.fromUtools); }, // 根据输出自动滚动及调整 utools 高度 @@ -258,7 +261,7 @@ export default { }); }, stopRun() { - this.runResult = ""; + this.runResult = []; if (!!this.subInputListener) { this.subInputValue = ""; utools.removeSubInput(); diff --git a/src/components/ResultArea.vue b/src/components/ResultArea.vue index 9aaf7f9..7bf0b1c 100644 --- a/src/components/ResultArea.vue +++ b/src/components/ResultArea.vue @@ -9,20 +9,22 @@ @load="frameLoad" v-if="showFrame" > -

+    
+
+ +

+      
+