Browse Source

挑人轉盤UI 選中學生顯示樣式

Louise Lin 3 years ago
parent
commit
03027b16fd
1 changed files with 6 additions and 4 deletions
  1. 6 4
      HiTeachCC/ClientApp/src/components/Tools/turnTable.vue

+ 6 - 4
HiTeachCC/ClientApp/src/components/Tools/turnTable.vue

@@ -13,7 +13,7 @@
         <div class="list" id="list">
           <ul :style="{ transform: `rotate(${this.rotatedeg}deg)` }" :class="{ go: isRotating }">
             <li v-for="item in prize_list" :key="item.index">
-              <p>{{ item.name }}</p>
+              <p class="list-name">{{ item.name }}</p>
               <p>{{ item.sort }}</p>
             </li>
           </ul>
@@ -82,7 +82,7 @@ export default {
           //console.log(this.nameList[ramdomIndex])
           element.img = this.nameList[ramdomIndex].headImg
           element.sort = this.nameList[ramdomIndex].sort
-          element.name = this.nameList[ramdomIndex].studentName
+          element.name = this.nameList[ramdomIndex].studentName.length>6?this.nameList[ramdomIndex].studentName.slice(0,5)+'..':this.nameList[ramdomIndex].studentName
         })
       }
     },
@@ -192,7 +192,7 @@ section.turntable {
       border-radius: 50%;
       background-color: #ffe3a8;
       z-index: -1;
-      box-shadow: 1px 2px 4px #754f00;
+      box-shadow: 0px 2px 4px #754f00;
     }
     &:active::after {
       box-shadow: none;
@@ -222,6 +222,8 @@ section.turntable {
         position: absolute;
         width: 100%;
         height: 100%;
+       
+       
       }
     }
     .go {
@@ -334,7 +336,7 @@ section.turntable {
       color: black;
       width: 30px;
       height: 30px;
-      top: 2px;
+      top: 4px;
       border-radius: 50%;
     }
     .pick-text {