From 04567babf8f0a7cae34a11c80cbc3cf44ea6c5f9 Mon Sep 17 00:00:00 2001 From: imp2002 Date: Fri, 10 Feb 2023 18:11:15 +0800 Subject: [PATCH] feat: fix click MenuItem blank part invalid bug (#1535) --- web/src/App.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/web/src/App.js b/web/src/App.js index 634bee0f..74e3b099 100644 --- a/web/src/App.js +++ b/web/src/App.js @@ -554,6 +554,13 @@ class App extends Component { }; renderContent() { + const onClick = ({key}) => { + if (key === "/swagger") { + window.open(Setting.isLocalhost() ? `${Setting.ServerUrl}/swagger` : "/swagger", "_blank"); + } else { + this.props.history.push(key); + } + }; return ( {/* https://github.com/ant-design/ant-design/issues/40394 ant design bug. If it will be fixed, we can delete the code for control the color of Header*/} @@ -580,6 +587,7 @@ class App extends Component { :