修复更改文件类型时匹配设置界面自动收起的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" :model-value="currentCommand.tags"
@update:model-value="updateModelValue('tags', $event)" @update:model-value="updateModelValue('tags', $event)"
:options="allQuickCommandTags" :options="allQuickCommandTags"
@focus="expandOnFocus && updateExpanded(true)"
dense dense
options-dense options-dense
filled filled
@ -281,9 +280,9 @@ export default defineComponent({
// //
if (!this.isExpanded) return; if (!this.isExpanded) return;
// //
const tagPopup = document.querySelector(".command-tag-popup"); const popupMenu = document.querySelector(".command-tag-popup,.file-type-popup");
if (tagPopup?.contains(event.target)) return; if (popupMenu?.contains(event.target)) return;
// //
const componentEl = this.$el; const componentEl = this.$el;

View File

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