fix: fix context menu error on macOS (#170)

* fix: fix context menu error on macOS

* fix: adjust context menu icon style
This commit is contained in:
864907600cc
2024-06-03 15:57:58 +08:00
committed by GitHub
parent 00bf52a411
commit ca740c83ae
2 changed files with 7 additions and 2 deletions

View File

@@ -12,7 +12,12 @@ const contextMenuStyle = css`
}
.ant-dropdown-menu-title-content {
padding-left: 20px;
padding-left: 22px;
}
.ant-dropdown-menu-item-icon {
font-size: 14px;
width: 14px;
}
.ant-dropdown-menu-item-icon + .ant-dropdown-menu-title-content {

View File

@@ -66,7 +66,7 @@ export function ContextAction({
option: 'Alt',
shift: 'Shift',
};
const regexp = new RegExp(Object.keys(keyMap).join('|').replace(/\\+/, '\\+'), 'ig');
const regexp = new RegExp(Object.keys(keyMap).join('|').replace(/\+/, '\\+'), 'ig');
return hotkey.replace(regexp, (match) => keyMap[match.toLowerCase()]);
}, [hotkey]);