From fe4428061ef0ea9fde8bc270dc58b2b11b540585 Mon Sep 17 00:00:00 2001 From: ccloli <8115912+ccloli@users.noreply.github.com> Date: Mon, 3 Jun 2024 11:40:16 +0800 Subject: [PATCH 1/2] fix: fix context menu error on macOS --- packages/ui/src/context-action.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/src/context-action.tsx b/packages/ui/src/context-action.tsx index 43f3ef7..8d40ff7 100644 --- a/packages/ui/src/context-action.tsx +++ b/packages/ui/src/context-action.tsx @@ -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]); From 4a2b1e1a9edc4ec8e221caca9c136a5a7045f2ed Mon Sep 17 00:00:00 2001 From: ccloli <8115912+ccloli@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:18:54 +0800 Subject: [PATCH 2/2] fix: adjust context menu icon style --- packages/designer/src/components/context-menu.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/designer/src/components/context-menu.tsx b/packages/designer/src/components/context-menu.tsx index 2d4471a..beff2eb 100644 --- a/packages/designer/src/components/context-menu.tsx +++ b/packages/designer/src/components/context-menu.tsx @@ -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 {