默认命令调整

This commit is contained in:
fofolee 2022-05-16 17:17:24 +08:00
parent 6f4bf8fe96
commit ef82e14d37

View File

@ -19,16 +19,15 @@ export default {
};
},
mounted() {
this.runCurrentCommand();
},
computed: {
currentCommand() {
return this.$root.utools.whole.db.get("qc_" + this.featureCode).data;
},
let command =
this.featureCode.slice(0, 8) === "default_"
? require(`../json/${this.featureCode}.json`)
: this.$root.utools.whole.db.get("qc_" + this.featureCode).data;
this.runCurrentCommand(command);
},
methods: {
runCurrentCommand() {
this.$refs.result.runCurrentCommand(_.cloneDeep(this.currentCommand));
runCurrentCommand(command) {
this.$refs.result.runCurrentCommand(_.cloneDeep(command));
},
},
};