diff --git a/src/components/codemirror.vue b/src/components/codemirror.vue index 9b29078..d9a35ae 100644 --- a/src/components/codemirror.vue +++ b/src/components/codemirror.vue @@ -17,7 +17,7 @@ >运行
-

+

{{ runResult }}

@@ -179,7 +179,7 @@ export default { this.$prompt(receiveResult, '提示', { confirmButtonText: "确定" }).then(({ value }) => { - this.runResult += `${value}
` + this.runResult += `${value}\n` // 把exit函数替换成用户输入的值 this.sourceCode = this.sourceCode.replace(`exit('validing:${receiveResult.replace(/[\r\n]*/g,'')}')`, _ => { return `'${value}'`