Skip to content

Commit b3a1895

Browse files
committed
refactor(components): simplify event handlers and clean unused code
1 parent 2ae3097 commit b3a1895

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

src/components/CommandSubmenu.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@
9595
@update:command="updateSubmenuCommand(subIndex, $event)"
9696
@remove="removeSubmenuCommand(subIndex)"
9797
@move="moveSubmenuCommand(subIndex, $event)"
98-
@add-input="(index) => addSubmenuInput()"
99-
@remove-input="(index, key) => removeSubmenuInput(key)"
100-
@update-input-key="(index, oldKey, newKey) => updateSubmenuInputKey(oldKey, newKey)"
98+
@add-input="() => addSubmenuInput()"
99+
@remove-input="(_index, key) => removeSubmenuInput(key)"
100+
@update-input-key="(_index, oldKey, newKey) => updateSubmenuInputKey(oldKey, newKey)"
101101
@add-multiple-command="addSubmenuMultipleCommand"
102102
@remove-multiple-command="removeSubmenuMultipleCommand"
103103
/>

src/components/HotkeyInput.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,6 @@ const handleGlobalKeyUp = (event: KeyboardEvent) => {
427427
const handleClickOutside = (event: Event) => {
428428
if (showDropdown.value) {
429429
const target = event.target as Element;
430-
const dropdown = document.querySelector('.hotkey-dropdown');
431430
const input = inputRef.value;
432431
433432
if (!target.closest('.hotkey-dropdown') && target !== input) {

src/components/SchedulerInput.vue

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@
196196
import { computed, ref, watch } from 'vue';
197197
import Input from './Input.vue';
198198
import Button from './Button.vue';
199-
import CustomSelect from './CustomSelect.vue';
200199
import SchedulerSelect from './SchedulerSelect.vue';
201200
202201
const props = defineProps<{
@@ -305,11 +304,6 @@ const parseCronExpression = () => {
305304
}
306305
};
307306
308-
// Функция для проверки, является ли значение кастомным
309-
const isCustomValue = (value: string, options: any[]) => {
310-
return !options.some(option => option.value === value);
311-
};
312-
313307
// Инициализируем из props
314308
if (props.modelValue) {
315309
cronExpression.value = props.modelValue;

0 commit comments

Comments
 (0)