完善执行命令功能 90%

This commit is contained in:
fofolee
2022-04-10 00:38:56 +08:00
parent e86fb1b02a
commit 73c5dbacee
9 changed files with 200 additions and 140 deletions

View File

@@ -29,7 +29,7 @@ export default {
},
methods: {
runCurrentCommand() {
this.$refs.result.runCurrentCommand(this.currentCommand);
this.$refs.result.runCurrentCommand(_.cloneDeep(this.currentCommand));
},
},
};

View File

@@ -187,6 +187,10 @@
></CommandEditor>
</q-card>
</q-dialog>
<CommandRunResult
:action="{ type: 'inPlugin' }"
ref="result"
></CommandRunResult>
</div>
</template>
@@ -195,6 +199,7 @@ import { defineAsyncComponent } from "vue";
import quickcommandParser from "../js/common/quickcommandParser.js";
import CommandCard from "components/CommandCard";
import ConfigurationMenu from "components/ConfigurationMenu.vue";
import CommandRunResult from "components/CommandRunResult.vue";
import importAll from "../js/common/importAll.js";
const CommandEditor = defineAsyncComponent(() =>
@@ -209,6 +214,7 @@ export default {
CommandCard,
ConfigurationMenu,
CommandEditor,
CommandRunResult,
},
data() {
return {
@@ -352,10 +358,19 @@ export default {
return;
case "edit":
this.editCommand(event.data);
return;
case "run":
this.runCommand(event.data);
return;
default:
return;
}
},
runCommand(code) {
this.$refs.result.runCurrentCommand(
_.cloneDeep(this.allQuickCommands[code])
);
},
// 启用命令
enableCommand(code) {
this.$utools.whole.setFeature(