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

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

Loading…
Cancel
Save