From 506e9e2b3f83681f882edf94839cbcbd5e48bc44 Mon Sep 17 00:00:00 2001 From: Jesse Rodriguez <54310591+1pone@users.noreply.github.com> Date: Wed, 27 Mar 2024 19:58:22 +0800 Subject: [PATCH] Fix case detail context menu (#649) * fix: hide case detail contextMenu * fix: hide case detail contextMenu --------- Co-authored-by: onePone --- packages/arex-core/src/components/DiffJsonView/index.tsx | 6 +++--- packages/arex/src/panes/ReplayCaseDetail/CaseDetailTab.tsx | 1 + packages/arex/vite.config.ts | 4 ++-- pnpm-lock.yaml | 3 --- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/arex-core/src/components/DiffJsonView/index.tsx b/packages/arex-core/src/components/DiffJsonView/index.tsx index 4a77f3e3..66a15c10 100644 --- a/packages/arex-core/src/components/DiffJsonView/index.tsx +++ b/packages/arex-core/src/components/DiffJsonView/index.tsx @@ -21,7 +21,7 @@ export type OnRenderContextMenu = ( path: string[], value: unknown, target: TargetEditor, -) => ContextMenuItem[] | undefined; +) => ContextMenuItem[] | false | undefined; export type DiffJsonViewProps = { readOnly?: boolean; @@ -88,7 +88,7 @@ const DiffJsonView = forwardRef((props, ref) context.selection.path, context.value, TargetEditor.LEFT, - ) || items + ) ?? items } /> @@ -110,7 +110,7 @@ const DiffJsonView = forwardRef((props, ref) context.selection.path, context.value, TargetEditor.RIGHT, - ) || items + ) ?? items } /> diff --git a/packages/arex/src/panes/ReplayCaseDetail/CaseDetailTab.tsx b/packages/arex/src/panes/ReplayCaseDetail/CaseDetailTab.tsx index fe5d56e9..887a8b74 100644 --- a/packages/arex/src/panes/ReplayCaseDetail/CaseDetailTab.tsx +++ b/packages/arex/src/panes/ReplayCaseDetail/CaseDetailTab.tsx @@ -55,6 +55,7 @@ const CaseDetailTab: FC = (props) => { left: t('request', { ns: 'common' }), right: t('response', { ns: 'common' }), }} + onRenderContextMenu={() => false} /> ), }))} diff --git a/packages/arex/vite.config.ts b/packages/arex/vite.config.ts index a4305e6a..68e942f3 100644 --- a/packages/arex/vite.config.ts +++ b/packages/arex/vite.config.ts @@ -27,8 +27,8 @@ export default defineConfig(async ({ mode }) => { resolve: { alias: { '@': path.resolve('./src'), - '@arextest/arex-core/dist': path.resolve('../arex-core/src'), - '@arextest/arex-core': path.resolve('../arex-core/src'), + // '@arextest/arex-core/dist': path.resolve('../arex-core/src'), + // '@arextest/arex-core': path.resolve('../arex-core/src'), // '@arextest/arex-request': path.resolve('../arex-request/src'), }, }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 390a8579..fb4b9bcb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -256,9 +256,6 @@ importers: '@formkit/auto-animate': specifier: ^0.7.0 version: 0.7.0 - '@hpcc-js/wasm': - specifier: ^2.14.1 - version: 2.16.0 ahooks: specifier: ^3.7.5 version: 3.7.10(react@18.2.0)