diff --git a/plugin/lib/lodashMini.js b/plugin/lib/lodashMini.js index 0c49d17..f9cab6a 100644 --- a/plugin/lib/lodashMini.js +++ b/plugin/lib/lodashMini.js @@ -249,27 +249,6 @@ const lodashMini = { ); }, - /** - * 移除数组中所有给定值 - * @param {Array} array - 要修改的数组 - * @param {...*} values - 要移除的值 - * @returns {Array} 返回数组本身 - * @example - * pull([1, 2, 3, 1, 2, 3], 2, 3) => [1, 1] - */ - pull: function (array, ...values) { - if (!array || !array.length || !values.length) return array; - let i = 0; - while (i < array.length) { - if (values.includes(array[i])) { - array.splice(i, 1); - } else { - i++; - } - } - return array; - }, - /** * 截断字符串 * @param {string} [string=''] - 要截断的字符串 diff --git a/src/components/CommandEditor.vue b/src/components/CommandEditor.vue index a845f18..b88367f 100644 --- a/src/components/CommandEditor.vue +++ b/src/components/CommandEditor.vue @@ -161,11 +161,6 @@ export default { this.commandInit(); this.sidebarInit(); }, - computed: { - configurationPage() { - return this.$root.$refs.view; - }, - }, methods: { // 命令初始化 commandInit() { diff --git a/src/components/ComposerEditor.vue b/src/components/ComposerEditor.vue index 70d757b..fa04d19 100644 --- a/src/components/ComposerEditor.vue +++ b/src/components/ComposerEditor.vue @@ -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) { diff --git a/src/components/config/CommandPanels.vue b/src/components/config/CommandPanels.vue index 8750b73..cc7e4c1 100644 --- a/src/components/config/CommandPanels.vue +++ b/src/components/config/CommandPanels.vue @@ -25,21 +25,24 @@ }" > -