2 Commits 034d29f63e ... a280a58168

Autor SHA1 Mensaje Fecha
  kongwenhao a280a58168 add hace 3 meses
  kongwenhao 195569e7f9 add hace 3 meses

+ 15 - 3
frontend/src/components/ModelGeneration/index.vue

@@ -34,10 +34,10 @@
       <div class="model-list-section">
         <!-- 标签页切换 -->
         <div class="tabs-container">
-          <div class="tab-item" :class="{ active: activeTab === 'female' }" @click="activeTab = 'female'">
+          <div class="tab-item" :class="{ active: activeTab === 'female' }" @click="switchTab('female')">
             女模特
           </div>
-          <div class="tab-item" :class="{ active: activeTab === 'male' }" @click="activeTab = 'male'">
+          <div class="tab-item" :class="{ active: activeTab === 'male' }" @click="switchTab('male')">
             男模特
           </div>
         </div>
@@ -64,7 +64,7 @@
 </template>
 
 <script setup lang="ts">
-import { ref, reactive, computed, onMounted } from 'vue'
+import { ref, reactive, computed, onMounted, nextTick } from 'vue'
 import { ElMessage } from 'element-plus'
 import { getShoesModelTemplateApi } from '@/apis/other'
 
@@ -141,6 +141,18 @@ const isModelSelected = (model: ModelData) => {
   }
 }
 
+// 切换标签页并滚动到顶部
+const switchTab = (tab: 'female' | 'male') => {
+  activeTab.value = tab
+  // 使用 nextTick 确保 DOM 更新后再滚动
+  nextTick(() => {
+    const modelGrid = document.querySelector('.model-grid') as HTMLElement
+    if (modelGrid) {
+      modelGrid.scrollTop = 0
+    }
+  })
+}
+
 // 确认选择
 const handleConfirm = () => {
   // 只传递必要的数据字段,避免序列化问题

+ 1 - 11
frontend/src/components/ScenePromptDialog/index.vue

@@ -10,16 +10,6 @@
           <!-- AI帮我写按钮 -->
           <div class="ai-help-button-container">
             <el-button type="primary" size="small" @click="handleAIHelp" :loading="aiLoading" class="ai-help-button">
-              <el-icon class="ai-icon">
-                <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
-                  <path
-                    d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
-                    fill="currentColor" />
-                  <path
-                    d="M512 336c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"
-                    fill="currentColor" />
-                </svg>
-              </el-icon>
               AI帮我写
             </el-button>
           </div>
@@ -159,7 +149,7 @@ const resetForm = () => {
 }
 
 .ai-help-button {
-  background: linear-gradient(135deg, #409eff 0%, #67c23a 100%);
+  background: #2957FF;
   border: none;
   border-radius: 20px;
   padding: 8px 16px;