Преглед изворни кода

修改web端点击聊天后隐藏菜单

李富豪 пре 4 месеци
родитељ
комит
df8d4fb019
1 измењених фајлова са 6 додато и 2 уклоњено
  1. 6 2
      app/components/sidebar.tsx

+ 6 - 2
app/components/sidebar.tsx

@@ -575,7 +575,9 @@ export const SideBar = (props: { className?: string }) => {
                   chatStore.updateCurrentSession((value) => {
                     value.appId = globalStore.selectedAppId;
                   });
-                  globalStore.setShowMenu(false);
+                  if (isMobileScreen) {
+                    globalStore.setShowMenu(false);
+                  }
                   if (getType() === 'bigModel') {
                     navigate({ pathname: '/newChat' });
                   } else {
@@ -625,7 +627,9 @@ export const SideBar = (props: { className?: string }) => {
               // @ts-ignore
               const props = info.item.props;
               const { showMenu, chatMode, appId } = props;
-              globalStore.setShowMenu(false);
+              if (isMobileScreen) {
+                globalStore.setShowMenu(false);
+              }
               let url = ``;
               if (getType() === 'bigModel') {
                 if (chatStore.chatMode === 'LOCAL') {