Skip to content

Commit 9466858

Browse files
应用sourcery的建议
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
1 parent 61e8cd8 commit 9466858

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

MaiChartManager/Front/src/views/ModManager/ConfigEntry.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export function optionsIoKeyMap(t: (key: string) => string): { label: string, va
3030
export function optionsKeyCodeOrName(t: (key: string) => string): { label: string, value: string }[] {
3131
return Object.entries(KeyCodeName).map(([label, value]) => {
3232
if (label.startsWith("CustomFn")) { // "自定义功能键"需要单独i18n
33-
return { label: t('mod.ioKeyMap.customFn') + label[8], value };
33+
const suffix = label.slice('CustomFn'.length);
34+
return { label: t('mod.ioKeyMap.customFn') + suffix, value };
3435
}
3536
return { label, value }; // 其他的则沿用枚举中的值
3637
});

0 commit comments

Comments
 (0)