修复更改文件类型时匹配设置界面自动收起的BUG,以及修改匹配界面自动展开的策略

This commit is contained in:
fofolee 2025-02-21 23:45:22 +08:00
parent 84c47db7e0
commit eb17456d4d
2 changed files with 10 additions and 11 deletions

View File

@ -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;

View File

@ -187,6 +187,7 @@
emit-value
map-options
class="col-2"
popup-content-class="file-type-popup"
/>
<q-input
v-model.number="rule.minLength"
@ -304,13 +305,12 @@ export default defineComponent({
data() {
return {
ruleTypeOptions: Object.values(commandTypes)
.map((type) => ({
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: {},
};