lsc 2 年之前
父節點
當前提交
8f68a60284
共有 2 個文件被更改,包括 19 次插入16 次删除
  1. 11 8
      src/components/courseDetail.vue
  2. 8 8
      src/components/student/courseDetail.vue

+ 11 - 8
src/components/courseDetail.vue

@@ -73,17 +73,16 @@
                 </div>
                 <div
                   class="Tname"
-                  :class="{TnameC:TnameCheck}"
                   v-if="Tname.length > 0"
                   style="margin-left: 32px"
                   @click="TnameCheck = !TnameCheck"
                 >
                   协同人员:<span
-                    v-for="(tname, tIndex) in Tname"
+                    v-for="(tname, tIndex) in TnameCheck ? Tname : Tname.slice(0,6)"
                     :key="tIndex"
                     style="margin: 0 5px; color: #000"
                     >{{ tname }}</span
-                  >
+                  ><span style="margin: 0 5px; color: #b2b2b2" v-if="!TnameCheck && Tname.length > 6">更多....</span>
                 </div>
               </div>
               <div class="cType" style="font-size: 18px; color: #6c6c6c">
@@ -102,6 +101,10 @@
               <div class="cType" style="font-size: 18px; color: #6c6c6c" v-if="classList.length && tType != 2">
                 <div>
                   授课班级:<el-button
+                    @click="gotoCourse()"
+                    style="background: #4a9eed; color: #fff; margin: 0 5px"
+                    >全部</el-button
+                  ><el-button
                     @click="gotoCourse(item.id)"
                     v-for="(item, index) in classList"
                     :key="index"
@@ -1562,18 +1565,18 @@ export default {
 .Tname {
   margin-left: 40px;
   word-break: break-all;
-  width:300px;
-  overflow: hidden;
+  width:auto;
+  /* overflow: hidden;
   white-space: nowrap;
-  text-overflow: ellipsis;
+  text-overflow: ellipsis; */
 }
 
-.TnameC{
+/* .TnameC{
   width:auto;
   overflow: unset;
   white-space: unset;
   text-overflow: unset;
-}
+} */
 
 .Tname > span {
   cursor: pointer;

+ 8 - 8
src/components/student/courseDetail.vue

@@ -53,9 +53,9 @@
                       courseDetail.username
                   }}</span>
                 </div>
-                <div class="Tname" :class="{TnameC:TnameCheck}" v-if="Tname.length > 0">
-                  协同人员:<span v-for="(tname, tIndex) in Tname" :key="tIndex" style="margin: 0 5px; color: #000" @click="TnameCheck = !TnameCheck">{{ tname
-                  }}</span>
+                <div class="Tname" v-if="Tname.length > 0" @click="TnameCheck = !TnameCheck">
+                  协同人员:<span v-for="(tname, tIndex) in  TnameCheck ? Tname : Tname.slice(0,6)" :key="tIndex" style="margin: 0 5px; color: #000">{{ tname
+                  }}</span><span style="margin: 0 5px; color: #b2b2b2" v-if="!TnameCheck && Tname.length > 6">更多....</span>
                 </div>
               </div>
               <div class="cType" style="font-size: 18px; color: #6c6c6c">
@@ -759,18 +759,18 @@ export default {
   cursor: pointer;
   margin-left: 40px;
   word-break: break-all;
-  width:300px;
-  overflow: hidden;
+  width:auto;
+  /* overflow: hidden;
   white-space: nowrap;
-  text-overflow: ellipsis;
+  text-overflow: ellipsis; */
 }
 
-.TnameC{
+/* .TnameC{
   width:auto;
   overflow: unset;
   white-space: unset;
   text-overflow: unset;
-}
+} */
 
 
 .detail {