fix(KeyCommon): useless pointerId of KeyMacro

This commit is contained in:
AkiChase 2024-05-07 11:06:41 +08:00
parent a20ce2cef8
commit 6cd83e93fd
3 changed files with 8 additions and 3 deletions

View File

@ -222,7 +222,7 @@ function showSetting() {
@update:value="keyboardStore.edited = true"
/>
</NFormItem>
<NFormItem label="触点ID">
<NFormItem v-if="keyMapping.type !== 'Macro'" label="触点ID">
<NInputNumber
v-model:value="keyMapping.pointerId"
:min="0"

View File

@ -1179,7 +1179,7 @@ function applyKeyMappingConfigShortcuts(
);
break;
default:
console.error("Invalid item type: ", item.type);
console.error("Invalid item type: ", item);
break;
}
}

View File

@ -66,8 +66,13 @@ type KeyMacroList = Array<{
type: KeyMacroType;
args: KeyMacroArgs;
}> | null;
interface KeyMacro extends Key {
interface KeyMacro {
type: "Macro";
key: string;
note: string;
posX: number;
posY: number;
macro: {
down: KeyMacroList;
loop: KeyMacroList;