cc 1 주 전
부모
커밋
995d1cde83
2개의 변경된 파일과 33개의 추가작업 그리고 19개의 파일을 삭제
  1. 32 18
      ai-electron/frontend/src/core/layouts/default/header/index.less
  2. 1 1
      ai-server/src/main/resources/application-dev.yaml

+ 32 - 18
ai-electron/frontend/src/core/layouts/default/header/index.less

@@ -150,10 +150,12 @@
     display: flex;
     justify-content: center;
     align-items: center;
-    flex: 0 1 392px;
+    /* 宽度由 min-width 托底(flex 基准会被挤到下限),整体较原值缩小 1/3:
+       296/392 → 197/261,下面各断点同样按 2/3 等比缩,避免窄屏反而更宽 */
+    flex: 0 1 261px;
     width: 100%;
-    min-width: 296px;
-    max-width: 392px;
+    min-width: 197px;
+    max-width: 261px;
     padding: 0 12px;
 
     &--empty {
@@ -167,9 +169,9 @@
     }
 
     &-search {
-      flex-basis: 320px;
-      min-width: 240px;
-      max-width: 320px;
+      flex-basis: 213px;
+      min-width: 160px;
+      max-width: 213px;
       padding: 0 8px;
     }
   }
@@ -180,17 +182,17 @@
     }
 
     &-search {
-      flex-basis: 260px;
-      min-width: 200px;
-      max-width: 260px;
+      flex-basis: 173px;
+      min-width: 133px;
+      max-width: 173px;
     }
   }
 
   @media (max-width: 960px) {
     &-search {
-      flex-basis: 220px;
-      min-width: 180px;
-      max-width: 220px;
+      flex-basis: 147px;
+      min-width: 120px;
+      max-width: 147px;
     }
   }
 
@@ -287,6 +289,16 @@
     }
   }
 
+  /* 模式切换开关(传统 ⇄ 智能)有组件自己的胶囊外观,上面 > div / > span 那套
+     “图标按钮”通用规则会把它撑成 38px 高、1.2em 字号的块,这里按组件规格还原;
+     图标被强制 20px + 左右 10px 内边距的那条已在浅/深色主题里用 :not 排除,
+     否则图标会和按钮文字被拉开。 */
+  &-action > .jeesite-workbench-switch {
+    height: auto;
+    line-height: normal;
+    font-size: inherit;
+  }
+
   &-page-actions {
     display: flex;
     align-items: center;
@@ -450,8 +462,9 @@
     }
 
     .@{header-prefix-cls}-action {
-      > div,
-      > span {
+      /* 同上:模式切换开关的图标保持组件给的 13px,不吃这里的放大规则 */
+      > div:not(.jeesite-workbench-switch),
+      > span:not(.jeesite-workbench-switch) {
         color: @text-color-base;
 
         .jeesite-icon {
@@ -526,8 +539,9 @@
     }
 
     .@{header-prefix-cls}-action {
-      > div,
-      > span {
+      /* 同上:模式切换开关的图标保持组件给的 13px,不吃这里的放大规则 */
+      > div:not(.jeesite-workbench-switch),
+      > span:not(.jeesite-workbench-switch) {
         .jeesite-icon {
           padding: 0 10px;
           font-size: 20px !important;
@@ -572,8 +586,8 @@ html[data-theme='dark'] {
   .@{header-prefix-cls} {
     &--dark {
       .@{header-prefix-cls}-action {
-        > div,
-        > span {
+        > div:not(.jeesite-workbench-switch),
+        > span:not(.jeesite-workbench-switch) {
           &:hover {
             background-color: #262626;
           }

+ 1 - 1
ai-server/src/main/resources/application-dev.yaml

@@ -61,7 +61,7 @@ sa-token:
   # 关闭活跃超时:研判过程中可能长时间不操作,不能因此被登出
   active-timeout: -1
   # 同账号不允许多端登录,后登录顶掉前登录(被顶方下次请求收到 code=401)
-  is-concurrent: false
+  is-concurrent: true
   is-share: false
   token-style: uuid
   is-log: false