openf12
yujialong 2 years ago
parent 91b2f034d2
commit 9533280f7e
  1. 9
      src/components/codemirror.vue

@ -174,7 +174,7 @@ export default {
showCursorWhenSelecting: true, showCursorWhenSelecting: true,
theme: "monokai" // theme: "monokai" //
}, },
inputTextReg: /^((?!#).*?(,|\(|\[|\{|\s)+)?input(?!\w)\(['|"]([\s\S]+?)['|"]\)/m, // input() inputTextReg: /^((?!#).*?(,|\s?|\(|\[|\{)+)?input(?!\w)\(['|"]([\s\S]+?)['|"]\)/m, // input()
requestList: [], // inputaxios requestList: [], // inputaxios
sourceCode: '', // inputexit sourceCode: '', // inputexit
requestTimer: null, // requestTimer: null, //
@ -362,7 +362,7 @@ export default {
type: "warning" type: "warning"
}) })
} else { } else {
const inputTextReg = this.inputTextReg const { inputTextReg } = this
const inputFuncReg = /input\(['|"]/g const inputFuncReg = /input\(['|"]/g
const bcId = this.judgmentId const bcId = this.judgmentId
const cid = this.courseId const cid = this.courseId
@ -389,7 +389,6 @@ export default {
}).then(res => { }).then(res => {
const data = res.code const data = res.code
const result = data.runResult const result = data.runResult
debugger
if(result.includes('File ')){ if(result.includes('File ')){
if (isWhile) { if (isWhile) {
this.runResult += result this.runResult += result
@ -504,7 +503,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.left{ .left{
position: relative; position: relative;
width: calc(100% - 400px); width: 60%;
} }
.text-wrapper { .text-wrapper {
white-space: pre-wrap; white-space: pre-wrap;
@ -607,7 +606,7 @@ export default {
} }
} }
.code-right { .code-right {
width: 500px; width: 40%;
color: #fff; color: #fff;
background: #1b1b1b; background: #1b1b1b;
display: inline-block; display: inline-block;

Loading…
Cancel
Save