更改enterData的赋值方式

This commit is contained in:
fofolee
2022-04-25 08:27:40 +08:00
parent 6d8034d950
commit 219d0146e0
3 changed files with 24 additions and 23 deletions

View File

@@ -105,9 +105,7 @@ export default defineComponent({
runCommandSilently(featureCode) {
let command = this.utools.getDB(this.utools.DBPRE.QC + featureCode);
if (command.program === "quickcommand") {
window.runCodeInSandbox(command.cmd, () => {}, {
quickcommand: _.cloneDeep(quickcommand),
});
window.runCodeInSandbox(command.cmd, () => {});
} else {
let option =
command.program === "custom"

View File

@@ -113,9 +113,6 @@ export default {
utools.outPlugin();
}, 500);
if (currentCommand.program === "quickcommand") {
let qc = _.cloneDeep(quickcommand);
qc.enterData = this.$root.enterData;
qc.type = this.$root.enterData.type;
window.runCodeInSandbox(
currentCommand.cmd,
(stdout, stderr) => {
@@ -126,7 +123,7 @@ export default {
}
!outPlugin && this.showRunResult(stdout, true, action);
},
{ quickcommand: qc }
{ enterData: this.$root.enterData }
);
} else if (currentCommand.program === "html") {
this.showRunResult(currentCommand.cmd, true, action);