Kaynağa Gözat

滚动固定调整

肖栋 1 hafta önce
ebeveyn
işleme
86bba37936

+ 4 - 0
src/components/mcpSiderBar.vue

@@ -203,6 +203,10 @@ const handleItemClick = (item) => {
   width: 220px;
   flex-shrink: 0;
   box-sizing: border-box;
+  position: sticky;
+  top: 16px;
+  max-height: calc(100vh - 32px);
+  overflow-y: auto;
   padding: 10px 8px 20px;
   background: #FFFFFF;
   border-radius: 8px 8px 8px 8px;

+ 0 - 1
src/pages/guide/index.vue

@@ -141,7 +141,6 @@
                         <div class="home-guide-note-title">注意事项</div>
                       </div>
                       <ul class="home-guide-note-list">
-                        <li>优先用内置「环评云助手」连接器;仅在需要自定义时用右侧 JSON</li>
                         <li>自定义接入时 type 字段为 streamableHttp(H 大写)</li>
                         <li>不需要在 URL 末尾添加 /mcp 后缀</li>
                         <li>将 YOUR_ACCESS_TOKEN 替换为真实 Token</li>

+ 0 - 1
src/pages/home/index.vue

@@ -326,7 +326,6 @@
                         <div class="home-guide-note-title">注意事项</div>
                       </div>
                       <ul class="home-guide-note-list">
-                        <li>优先用内置「环评云助手」连接器;仅在需要自定义时用右侧 JSON</li>
                         <li>自定义接入时 type 字段为 streamableHttp(H 大写)</li>
                         <li>不需要在 URL 末尾添加 /mcp 后缀</li>
                         <li>将 YOUR_ACCESS_TOKEN 替换为真实 Token</li>

+ 25 - 1
src/pages/mcp/onlineTest.vue

@@ -1326,7 +1326,7 @@ const runTest = async () => {
   padding: 16px 20px 24px;
   background: #F7F9FC;
   min-width: 0;
-  overflow-x: hidden;
+  overflow-x: clip;
 }
 
 .otp-breadcrumb {
@@ -1374,6 +1374,11 @@ const runTest = async () => {
 .otp-side {
   flex: 1 1 0;
   min-width: 0;
+  display: flex;
+  flex-direction: column;
+  position: sticky;
+  top: 16px;
+  max-height: calc(100vh - 32px);
   overflow: hidden;
   box-sizing: border-box;
   padding: 16px;
@@ -1399,6 +1404,8 @@ const runTest = async () => {
   flex-direction: column;
   gap: 10px;
   margin-top: 14px;
+  min-height: 0;
+  overflow-y: auto;
 }
 
 .otp-side-item {
@@ -2396,6 +2403,9 @@ const runTest = async () => {
 .otp-result {
   flex: 1.5 1.5 0;
   min-width: 0;
+  position: sticky;
+  top: 16px;
+  max-height: calc(100vh - 32px);
   overflow: hidden;
 }
 
@@ -2692,6 +2702,8 @@ const runTest = async () => {
   }
 
   .otp-side {
+    top: 12px;
+    max-height: calc(100vh - 32px);
     padding: 12px;
   }
 
@@ -2774,6 +2786,11 @@ const runTest = async () => {
     font-size: 13px;
   }
 
+  .otp-result {
+    top: 12px;
+    max-height: calc(100vh - 32px);
+  }
+
   .otp-result-card {
     min-height: 480px;
     padding: 12px;
@@ -2797,6 +2814,13 @@ const runTest = async () => {
     width: 100%;
   }
 
+  .otp-side,
+  .otp-result {
+    position: static;
+    top: auto;
+    max-height: none;
+  }
+
   .otp-result-card {
     min-height: 360px;
   }