fix(editor): Enable ctrl/cmd click in workflow editor header (#8387)

This commit is contained in:
Tomi Turtiainen
2024-01-19 14:28:44 +02:00
committed by GitHub
parent 284d965b5a
commit e43cf2fd71
2 changed files with 59 additions and 37 deletions

View File

@@ -10,7 +10,7 @@
:active="modelValue === option.value"
:size="size"
:disabled="disabled || option.disabled"
@click.prevent.stop="onClick(option)"
@click.prevent.stop="onClick(option, $event)"
/>
</div>
</template>
@@ -47,12 +47,13 @@ export default defineComponent({
type: Boolean,
},
},
emits: ['update:modelValue'],
methods: {
onClick(option: { label: string; value: string; disabled?: boolean }) {
onClick(option: { label: string; value: string; disabled?: boolean }, event: MouseEvent) {
if (this.disabled || option.disabled) {
return;
}
this.$emit('update:modelValue', option.value);
this.$emit('update:modelValue', option.value, event);
},
},
});