Sfoglia il codice sorgente

修复了一些bug,基本完成我的批改页面开发

Jiang Pengyu 1 anno fa
parent
commit
58136443c2
1 ha cambiato i file con 29 aggiunte e 11 eliminazioni
  1. 29 11
      src/views/CorrectPage/CoursePage.vue

+ 29 - 11
src/views/CorrectPage/CoursePage.vue

@@ -176,15 +176,15 @@
               </el-table-column>
               <el-table-column label="操作" width="200">
                 <template #default="scope">
-                  <el-button 
-                    type="primary" 
-                    size="small" 
-                    class="action-button"
-                    @click="handleCorrect(scope.row)"
-                  >
-                    <el-icon><View /></el-icon>
-                    批改
-                  </el-button>
+                                      <el-button 
+                      type="primary" 
+                      size="small" 
+                      class="action-button"
+                      @click="handleCorrect(scope.row)"
+                    >
+                      <el-icon class="correct-icon"><ZoomIn /></el-icon>
+                      批改
+                    </el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -263,7 +263,7 @@
   import useApis from "@/apis";
   import {useStore} from "@/store";
   import {inject, ref, reactive, computed} from "vue";
-  import {Refresh, Search, Document, ArrowDown, ArrowRight, User, CircleCheck, WarningFilled, View, Sort} from "@element-plus/icons-vue";
+  import {Refresh, Search, Document, ArrowDown, ArrowRight, User, CircleCheck, WarningFilled, View, Sort, ZoomIn} from "@element-plus/icons-vue";
   import "./CoursePage.scss"
 
   const apis = useApis()
@@ -610,12 +610,15 @@ export default {
 }
 
 .left-sidebar {
+  min-width: 320px;
+  max-width: 320px;
   width: 320px;
   background-color: white;
   border-right: 1px solid #e8e8e8;
   display: flex;
   flex-direction: column;
   height: 100vh;
+  flex-shrink: 0;  /* 防止侧边栏被压缩 */
 }
 
 .platform-header {
@@ -675,8 +678,10 @@ export default {
 .menu-section {
   flex: 1;
   overflow-y: auto;
+  overflow-x: hidden;  /* 防止水平滚动 */
   padding: 0;
   height: calc(100vh - 120px);
+  width: 100%;  /* 确保宽度不超过父容器 */
 }
 
 .menu-item {
@@ -735,6 +740,9 @@ export default {
   font-family: "Noto Sans SC", sans-serif;
   background-color: #F0F2F5;
   color: #606266;
+  white-space: nowrap;  /* 防止文本换行 */
+  overflow: hidden;     /* 隐藏超出部分 */
+  text-overflow: ellipsis;  /* 显示省略号 */
 }
 
 .assignment-item:hover {
@@ -762,6 +770,10 @@ export default {
   font-weight: 500;
   color: #606266;
   font-family: "Noto Sans SC", sans-serif;
+  flex: 1;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
 }
 
 .assignment-item.active .assignment-name {
@@ -1047,9 +1059,15 @@ export default {
     background-color: #4A90C4;
     border-color: #4A90C4;
     padding: 4px 8px;
-    font-size: 12px;
+    font-size: 13px;
     font-family: "Noto Sans SC", sans-serif;
   }
+
+  /* 批改按钮图标样式 */
+  .correct-icon {
+    font-size: 16px;
+    margin-right: 4px;
+  }
   
   /* 排序头部样式 */
   .score-header {