diff --git a/src/components/editor/CommandConfig.vue b/src/components/editor/CommandConfig.vue index 47abd9e..9f8a6c5 100644 --- a/src/components/editor/CommandConfig.vue +++ b/src/components/editor/CommandConfig.vue @@ -29,7 +29,6 @@ :model-value="currentCommand.tags" @update:model-value="updateModelValue('tags', $event)" :options="allQuickCommandTags" - @focus="expandOnFocus && updateExpanded(true)" dense options-dense filled @@ -281,9 +280,9 @@ export default defineComponent({ // 如果面板已经折叠,不需要处理 if (!this.isExpanded) return; - // 检查点击是否在标签选择框的弹出菜单内 - const tagPopup = document.querySelector(".command-tag-popup"); - if (tagPopup?.contains(event.target)) return; + // 检查点击是否在标签选择框或文件类型选择框的弹出菜单内 + const popupMenu = document.querySelector(".command-tag-popup,.file-type-popup"); + if (popupMenu?.contains(event.target)) return; // 检查点击是否在组件内部 const componentEl = this.$el; diff --git a/src/components/editor/MatchRuleEditor.vue b/src/components/editor/MatchRuleEditor.vue index 4553e69..26b28ce 100644 --- a/src/components/editor/MatchRuleEditor.vue +++ b/src/components/editor/MatchRuleEditor.vue @@ -187,6 +187,7 @@ emit-value map-options class="col-2" + popup-content-class="file-type-popup" /> ({ - label: type.label, - value: type.name, - icon: type.icon, - color: type.color, - })), + ruleTypeOptions: Object.values(commandTypes).map((type) => ({ + label: type.label, + value: type.name, + icon: type.icon, + color: type.color, + })), commandTypes, isHovering: {}, };