mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-09-24 13:03:30 +08:00
运行命令界面
This commit is contained in:
@@ -1,22 +1,41 @@
|
||||
<template>
|
||||
<div>
|
||||
<CommandRunResult :action="action"></CommandRunResult>
|
||||
<CommandRunResult :action="action" ref="result"></CommandRunResult>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CommandRunResult from "components/CommandRunResult.vue";
|
||||
import CommandRunResult from "components/CommandRunResult";
|
||||
|
||||
export default {
|
||||
component: { CommandRunResult },
|
||||
components: { CommandRunResult },
|
||||
data() {
|
||||
return {
|
||||
action: {
|
||||
type: "fromUtools",
|
||||
data: quickcommand.enterData,
|
||||
data: {},
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
mounted() {
|
||||
window.commandPage = this;
|
||||
this.runCurrentCommand();
|
||||
},
|
||||
computed: {
|
||||
featureCode() {
|
||||
return this.$route.params.type + "_" + this.$route.params.uid;
|
||||
},
|
||||
currentCommand() {
|
||||
return this.$utools.whole.db.get("qc_" + this.featureCode).data;
|
||||
},
|
||||
},
|
||||
beforeRouteUpdate(to, from, next) {
|
||||
this.runCurrentCommand();
|
||||
},
|
||||
methods: {
|
||||
runCurrentCommand() {
|
||||
this.$refs.result.runCurrentCommand(this.currentCommand);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user