From 27b902974105efe66510822a969e368ea66023bf Mon Sep 17 00:00:00 2001 From: Baobhan Sith <80159437+Heavrnl@users.noreply.github.com> Date: Tue, 22 Apr 2025 02:34:01 +0800 Subject: [PATCH] Update FocusSwitcherConfigurator.vue --- .../components/FocusSwitcherConfigurator.vue | 225 +++++++++++++----- 1 file changed, 160 insertions(+), 65 deletions(-) diff --git a/packages/frontend/src/components/FocusSwitcherConfigurator.vue b/packages/frontend/src/components/FocusSwitcherConfigurator.vue index 520d63a..6d2b822 100644 --- a/packages/frontend/src/components/FocusSwitcherConfigurator.vue +++ b/packages/frontend/src/components/FocusSwitcherConfigurator.vue @@ -162,6 +162,13 @@ const saveConfiguration = () => { emit('close'); // 保存后关闭 }; +const removeFromSequence = (index: number) => { + if (index >= 0 && index < localSequence.value.length) { + localSequence.value.splice(index, 1); + // hasChanges 会在 watch 中自动更新 + } +}; + // --- Computed --- // ++ 修改:计算属性,获取不在右侧序列中的项目 (用于左侧列表) ++ const localAvailableInputs = computed(() => { @@ -171,7 +178,7 @@ const localAvailableInputs = computed(() => { .filter(input => !sequenceIds.has(input.id)) .map(input => ({ ...input, - shortcut: localItemConfigs.value[input.id]?.shortcut // 从本地配置获取快捷键 + // shortcut: localItemConfigs.value[input.id]?.shortcut // 快捷键在下方单独配置 })); }); @@ -188,63 +195,89 @@ const localAvailableInputs = computed(() => { -
-
-

{{ t('focusSwitcher.availableInputs', '可用输入框') }}

- - - - -
- -
-

{{ t('focusSwitcher.configuredSequence', '切换顺序 (拖拽排序)') }}

- - -