jichoi / lms_front star
이은진 이은진 2024-08-22
240822 이은진 대시보드 css 수정
@8e10b4507fee758fe0ce665d77661bf02f2c8d15
client/views/pages/main/Dashboard.vue
--- client/views/pages/main/Dashboard.vue
+++ client/views/pages/main/Dashboard.vue
@@ -20,8 +20,10 @@
                                 :style="{ display: rabbitPos[1] ? 'block' : 'none' }"></div>
                         <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)"
                             data-num="1">
-                            <img :src="item.imgSrc1" :style="{ display: !rabbitCompl[1] ? 'block' : 'none' }">
-                            <img :src="item.imgSrc2" :style="{ display: rabbitCompl[1] ? 'block' : 'none' }">
+                            <img :src="labeledItems[0].label.length >= 4 ? item.imgSrc3 : item.imgSrc1"
+                                :style="{ display: !rabbitCompl[1] ? 'block' : 'none' }">
+                            <img :src="labeledItems[0].label.length >= 4 ? item.imgSrc4 : item.imgSrc2"
+                                :style="{ display: rabbitCompl[1] ? 'block' : 'none' }">
                         </button>
                         <p>{{ labeledItems[0].label }}</p>
                     </div>
@@ -30,8 +32,10 @@
                                 :style="{ display: rabbitPos[2] ? 'block' : 'none' }"></div>
                         <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)"
                             data-num="2">
-                            <img :src="item.imgSrc1" :style="{ display: !rabbitCompl[2] ? 'block' : 'none' }">
-                            <img :src="item.imgSrc2" :style="{ display: rabbitCompl[2] ? 'block' : 'none' }">
+                            <img :src="labeledItems[1].label.length >= 4 ? item.imgSrc3 : item.imgSrc1"
+                                :style="{ display: !rabbitCompl[2] ? 'block' : 'none' }">
+                            <img :src="labeledItems[1].label.length >= 4 ? item.imgSrc4 : item.imgSrc2"
+                                :style="{ display: rabbitCompl[2] ? 'block' : 'none' }">
                         </button>
                         <p>{{ labeledItems[1].label }}</p>
                     </div>
@@ -43,8 +47,10 @@
                                 :style="{ display: rabbitPos[7] ? 'block' : 'none' }"></div>
                         <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)"
                             data-num="7">
-                            <img :src="item.imgSrc1" :style="{ display: !rabbitCompl[7] ? 'block' : 'none' }">
-                            <img :src="item.imgSrc2" :style="{ display: rabbitCompl[7] ? 'block' : 'none' }">
+                            <img :src="labeledItems[6].label.length >= 4 ? item.imgSrc3 : item.imgSrc1"
+                                :style="{ display: !rabbitCompl[7] ? 'block' : 'none' }">
+                            <img :src="labeledItems[6].label.length >= 4 ? item.imgSrc4 : item.imgSrc2"
+                                :style="{ display: rabbitCompl[7] ? 'block' : 'none' }">
                         </button>
                         <p>{{ labeledItems[6].label }}</p>
                     </div>
@@ -53,8 +59,10 @@
                                 :style="{ display: rabbitPos[6] ? 'block' : 'none' }"></div>
                         <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)"
                             data-num="6">
-                            <img :src="item.imgSrc1" :style="{ display: !rabbitCompl[6] ? 'block' : 'none' }">
-                            <img :src="item.imgSrc2" :style="{ display: rabbitCompl[6] ? 'block' : 'none' }">
+                            <img :src="labeledItems[5].label.length >= 4 ? item.imgSrc3 : item.imgSrc1"
+                                :style="{ display: !rabbitCompl[6] ? 'block' : 'none' }">
+                            <img :src="labeledItems[5].label.length >= 4 ? item.imgSrc4 : item.imgSrc2"
+                                :style="{ display: rabbitCompl[6] ? 'block' : 'none' }">
                         </button>
                         <p>{{ labeledItems[5].label }}</p>
                     </div>
@@ -64,8 +72,10 @@
                                 :style="{ display: rabbitPos[5] ? 'block' : 'none' }"></div>
                         <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)"
                             data-num="5">
-                            <img :src="item.imgSrc1" :style="{ display: !rabbitCompl[5] ? 'block' : 'none' }">
-                            <img :src="item.imgSrc2" :style="{ display: rabbitCompl[5] ? 'block' : 'none' }">
+                            <img :src="labeledItems[4].label.length >= 4 ? item.imgSrc3 : item.imgSrc1"
+                                :style="{ display: !rabbitCompl[5] ? 'block' : 'none' }">
+                            <img :src="labeledItems[4].label.length >= 4 ? item.imgSrc4 : item.imgSrc2"
+                                :style="{ display: rabbitCompl[5] ? 'block' : 'none' }">
                         </button>
                         <p>{{ labeledItems[4].label }}</p>
                     </div>
@@ -75,8 +85,10 @@
                                 :style="{ display: rabbitPos[4] ? 'block' : 'none' }"></div>
                         <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)"
                             data-num="4">
-                            <img :src="item.imgSrc1" :style="{ display: !rabbitCompl[4] ? 'block' : 'none' }">
-                            <img :src="item.imgSrc2" :style="{ display: rabbitCompl[4] ? 'block' : 'none' }">
+                            <img :src="labeledItems[3].label.length >= 4 ? item.imgSrc3 : item.imgSrc1"
+                                :style="{ display: !rabbitCompl[4] ? 'block' : 'none' }">
+                            <img :src="labeledItems[3].label.length >= 4 ? item.imgSrc4 : item.imgSrc2"
+                                :style="{ display: rabbitCompl[4] ? 'block' : 'none' }">
                         </button>
                         <p>{{ labeledItems[3].label }}</p>
                     </div>
@@ -86,8 +98,10 @@
                                 :style="{ display: rabbitPos[3] ? 'block' : 'none' }"></div>
                         <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)"
                             data-num="3">
-                            <img :src="item.imgSrc1" :style="{ display: !rabbitCompl[3] ? 'block' : 'none' }">
-                            <img :src="item.imgSrc2" :style="{ display: rabbitCompl[3] ? 'block' : 'none' }">
+                            <img :src="labeledItems[2].label.length >= 4 ? item.imgSrc3 : item.imgSrc1"
+                                :style="{ display: !rabbitCompl[3] ? 'block' : 'none' }">
+                            <img :src="labeledItems[2].label.length >= 4 ? item.imgSrc4 : item.imgSrc2"
+                                :style="{ display: rabbitCompl[3] ? 'block' : 'none' }">
                         </button>
                         <p>{{ labeledItems[2].label }}</p>
                     </div>
@@ -98,8 +112,10 @@
                                 :style="{ display: rabbitPos[8] ? 'block' : 'none' }"></div>
                         <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)"
                             data-num="8">
-                            <img :src="item.imgSrc3" :style="{ display: !rabbitCompl[8] ? 'block' : 'none' }">
-                            <img :src="item.imgSrc4" :style="{ display: rabbitCompl[8] ? 'block' : 'none' }">
+                            <img :src="labeledItems[7].label.length >= 4 ? item.imgSrc3 : item.imgSrc1"
+                                :style="{ display: !rabbitCompl[8] ? 'block' : 'none' }">
+                            <img :src="labeledItems[7].label.length >= 4 ? item.imgSrc4 : item.imgSrc2"
+                                :style="{ display: rabbitCompl[8] ? 'block' : 'none' }">
                         </button>
                         <p class="long">{{ labeledItems[7].label }}</p>
                     </div>
@@ -109,8 +125,10 @@
                                 :style="{ display: rabbitPos[9] ? 'block' : 'none' }"></div>
                         <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)"
                             data-num="9">
-                            <img :src="item.imgSrc1" :style="{ display: !rabbitCompl[9] ? 'block' : 'none' }">
-                            <img :src="item.imgSrc2" :style="{ display: rabbitCompl[9] ? 'block' : 'none' }">
+                            <img :src="labeledItems[8].label.length >= 4 ? item.imgSrc3 : item.imgSrc1"
+                                :style="{ display: !rabbitCompl[9] ? 'block' : 'none' }">
+                            <img :src="labeledItems[8].label.length >= 4 ? item.imgSrc4 : item.imgSrc2"
+                                :style="{ display: rabbitCompl[9] ? 'block' : 'none' }">
                         </button>
                         <p>{{ labeledItems[8].label }}</p>
                     </div>
@@ -120,8 +138,10 @@
                                 :style="{ display: rabbitPos[10] ? 'block' : 'none' }"></div>
                         <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)"
                             data-num="10">
-                            <img :src="item.imgSrc1" :style="{ display: !rabbitCompl[10] ? 'block' : 'none' }">
-                            <img :src="item.imgSrc2" :style="{ display: rabbitCompl[10] ? 'block' : 'none' }">
+                            <img :src="labeledItems[9].label.length >= 4 ? item.imgSrc3 : item.imgSrc1"
+                                :style="{ display: !rabbitCompl[10] ? 'block' : 'none' }">
+                            <img :src="labeledItems[9].label.length >= 4 ? item.imgSrc4 : item.imgSrc2"
+                                :style="{ display: rabbitCompl[10] ? 'block' : 'none' }">
                         </button>
                         <p>{{ labeledItems[9].label }}</p>
                     </div>
@@ -132,8 +152,10 @@
                                 :style="{ display: rabbitPos[11] ? 'block' : 'none' }"></div>
                         <button class="popTxt" v-for="(item, index) in items" :key="index"
                             @click="toggleImageAndShowPopup(index, '11')" data-num="11">
-                            <img :src="item.imgSrc3" :style="{ display: !rabbitCompl[11] ? 'block' : 'none' }">
-                            <img :src="item.imgSrc4" :style="{ display: rabbitCompl[11] ? 'block' : 'none' }">
+                            <img :src="labeledItems[10].label.length >= 4 ? item.imgSrc3 : item.imgSrc1"
+                                :style="{ display: !rabbitCompl[11] ? 'block' : 'none' }">
+                            <img :src="labeledItems[10].label.length >= 4 ? item.imgSrc4 : item.imgSrc2"
+                                :style="{ display: rabbitCompl[11] ? 'block' : 'none' }">
                         </button>
                         <p class="long">{{ labeledItems[10].label }}</p>
                     </div>
@@ -200,7 +222,7 @@
         <div class="complete-wrap  myphoto">
             <button class="login-btn mt10" type="submit" style="width: 100%;" @click="finishSchedule"><img
                     src="../../../resources/img/btn07_s.png" alt="" style="width: 100%; height: 100px;">
-                <p>학습 종료하기</p>
+                <p>학습 종료하기</p>np
             </button>
             <h2 class="mb40 mt10">이 단원을 끝낸 친구들</h2>
 
@@ -805,4 +827,8 @@
     bottom: 0;
     width: 40%;
 }
+
+.race-btn p {
+    width: auto;
+}
 </style>
(No newline at end of file)
Add a comment
List