|
|
@ -17,7 +17,7 @@ |
|
|
|
>运行</el-button> |
|
|
|
>运行</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="code-right answer"> |
|
|
|
<div class="code-right answer"> |
|
|
|
<p class="text-wrapper" v-html="runResult"></p> |
|
|
|
<p class="text-wrapper">{{ runResult }}</p> |
|
|
|
<div class="pic-wrap" v-if="picSrc"> |
|
|
|
<div class="pic-wrap" v-if="picSrc"> |
|
|
|
<div style="margin-bottom: 5px;text-align: center"> |
|
|
|
<div style="margin-bottom: 5px;text-align: center"> |
|
|
|
<img class="pic" :src="picSrc" alt=""> |
|
|
|
<img class="pic" :src="picSrc" alt=""> |
|
|
@ -179,7 +179,7 @@ export default { |
|
|
|
this.$prompt(receiveResult, '提示', { |
|
|
|
this.$prompt(receiveResult, '提示', { |
|
|
|
confirmButtonText: "确定" |
|
|
|
confirmButtonText: "确定" |
|
|
|
}).then(({ value }) => { |
|
|
|
}).then(({ value }) => { |
|
|
|
this.runResult += `${value}<br>` |
|
|
|
this.runResult += `${value}\n` |
|
|
|
// 把exit函数替换成用户输入的值 |
|
|
|
// 把exit函数替换成用户输入的值 |
|
|
|
this.sourceCode = this.sourceCode.replace(`exit('validing:${receiveResult.replace(/[\r\n]*/g,'')}')`, _ => { |
|
|
|
this.sourceCode = this.sourceCode.replace(`exit('validing:${receiveResult.replace(/[\r\n]*/g,'')}')`, _ => { |
|
|
|
return `'${value}'` |
|
|
|
return `'${value}'` |
|
|
|