From 7e091092ee1a8bd4216d81e93a329ff32d5eefb4 Mon Sep 17 00:00:00 2001 From: chenos Date: Thu, 5 Aug 2021 18:54:32 +0800 Subject: [PATCH] fix: sortable for Menu.URL --- packages/client/src/schemas/menu/index.tsx | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/client/src/schemas/menu/index.tsx b/packages/client/src/schemas/menu/index.tsx index 208a5c282..cc48f905c 100644 --- a/packages/client/src/schemas/menu/index.tsx +++ b/packages/client/src/schemas/menu/index.tsx @@ -160,6 +160,7 @@ export const Menu: any = observer((props: any) => { setDragOverlayContent(event.active.data?.current?.title || ''); }} onDragEnd={async (event) => { + console.log({ event }); const path1 = event.active?.data?.current?.path; const path2 = event.over?.data?.current?.path; const data = moveToAfter(path1, path2); @@ -296,13 +297,28 @@ Menu.URL = observer((props: any) => { return ( } + icon={null} eventKey={schema.name} key={schema.name} + onClick={(info) => { + window.open(props.href); + }} > - + + {icon && ( + + + + )} {schema.title} - + + );