From aa6168fe20db41a0cc964ca7ead8da904a75dc6e Mon Sep 17 00:00:00 2001 From: smirkQAQ <46101889+smirkQAQ@users.noreply.github.com> Date: Wed, 27 Sep 2023 08:18:38 +0800 Subject: [PATCH] fix: Fix context menu style not working (#3075) --- .../ContextMenu/src/ContextMenu.vue | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/components/ContextMenu/src/ContextMenu.vue b/src/components/ContextMenu/src/ContextMenu.vue index 823b90e11..fcf6fcbaa 100644 --- a/src/components/ContextMenu/src/ContextMenu.vue +++ b/src/components/ContextMenu/src/ContextMenu.vue @@ -59,12 +59,12 @@ const left = body.clientWidth < x + menuWidth ? x - menuWidth : x; const top = body.clientHeight < y + menuHeight ? y - menuHeight : y; return { - ...styles, position: 'absolute', width: `${width}px`, left: `${left + 1}px`, top: `${top + 1}px`, zIndex: 9999, + ...styles, // Not the first, fix options.styles.width not working }; }); @@ -127,11 +127,15 @@ } const { items } = props; return ( -