uTools-quickcommand/src/pages/CommandPage.vue
2022-04-13 16:49:47 +08:00

36 lines
694 B
Vue

<template>
<div>
<CommandRunResult :action="action" ref="result"></CommandRunResult>
</div>
</template>
<script>
import CommandRunResult from "components/CommandRunResult";
export default {
components: { CommandRunResult },
data() {
return {
action: {
type: "input",
data: {},
},
featureCode: this.$route.path.slice(1),
};
},
mounted() {
this.runCurrentCommand();
},
computed: {
currentCommand() {
return this.$utools.whole.db.get("qc_" + this.featureCode).data;
},
},
methods: {
runCurrentCommand() {
this.$refs.result.runCurrentCommand(_.cloneDeep(this.currentCommand));
},
},
};
</script>