重构ConfigurationPage,优化数据传递

This commit is contained in:
fofolee
2025-02-13 21:43:18 +08:00
parent a1c00e962c
commit 9ffa941e72
12 changed files with 291 additions and 369 deletions

View File

@@ -15,13 +15,11 @@ import CommandComposer from "components/composer/CommandComposer.vue";
import CommandRunResult from "components/CommandRunResult";
import { findCommandByValue } from "js/composer/composerConfig";
import programs from "js/options/programs.js";
import { provide, ref } from "vue";
import { ref } from "vue";
export default {
components: { CommandComposer, CommandRunResult },
setup(props) {
provide("allQuickCommandTags", props.allQuickCommandTags);
const retoreToFullCommand = (command) => {
const { flows } = command;
if (!flows) return command;
@@ -100,9 +98,13 @@ export default {
...defaultCommand,
...retoreToFullCommand(savedCommand),
});
const isRunComposePage = ref(props.action.type === "composer");
return {
quickcommandInfo,
getLitedComposerCommand,
isRunComposePage,
};
},
emits: ["editorEvent"],
@@ -111,15 +113,6 @@ export default {
type: Object,
required: true,
},
allQuickCommandTags: {
type: Array,
default: () => [],
},
},
data() {
return {
isRunComposePage: this.action.type === "composer",
};
},
methods: {
handleComposerAction(actionType, command) {