jichoi / lms_front star
홍아랑 홍아랑 2024-08-23
240823 정다정 홍아랑 미니게임 문제 첫페이지 이전 버튼 숨기기 추가
@5ea7b92d342b3d874ed3c915f9dc09c45bc263ba
client/views/pages/main/Chapter/Chapter2_10.vue
--- client/views/pages/main/Chapter/Chapter2_10.vue
+++ client/views/pages/main/Chapter/Chapter2_10.vue
@@ -18,7 +18,11 @@
       <button class="completeBtn" @click="complete">학습 종료</button>
     </div>
     <div class="flex justify-between align-center">
-      <div class="pre-btn" @click="previousProblem()">
+      <div
+        class="pre-btn"
+        :style="{ visibility: hiddenState ? 'hidden' : 'visible' }"
+        @click="previousProblem()"
+      >
         <img src="../../../../resources/img/left.png" alt="" />
       </div>
       <div class="content title-box">
@@ -128,6 +132,8 @@
       answerArr: [],
 
       seq: this.$store.getters.seqNum,
+
+      hiddenState: false,
     };
   },
   methods: {
@@ -309,6 +315,9 @@
   },
   mounted() {
     this.fetchProblemData();
+    if (this.currentProblemIndex == 0) {
+      this.hiddenState = true;
+    }
   },
 };
 </script>
client/views/pages/main/Chapter/Chapter2_11.vue
--- client/views/pages/main/Chapter/Chapter2_11.vue
+++ client/views/pages/main/Chapter/Chapter2_11.vue
@@ -18,7 +18,11 @@
       <button class="completeBtn" @click="complete">학습 종료</button>
     </div>
     <div class="flex justify-between align-center">
-      <div class="pre-btn" @click="previousProblem()">
+      <div
+        class="pre-btn"
+        :style="{ visibility: hiddenState ? 'hidden' : 'visible' }"
+        @click="previousProblem()"
+      >
         <img src="../../../../resources/img/left.png" alt="" />
       </div>
       <div class="content title-box">
@@ -105,6 +109,7 @@
       dataList: [],
 
       seq: this.$store.getters.seqNum,
+      hiddenState: false,
     };
   },
   methods: {
@@ -282,6 +287,10 @@
   },
   mounted() {
     this.getProblem();
+
+    if (this.currentProblemIndex == 0) {
+      this.hiddenState = true;
+    }
   },
 };
 </script>
client/views/pages/main/Chapter/Chapter2_13.vue
--- client/views/pages/main/Chapter/Chapter2_13.vue
+++ client/views/pages/main/Chapter/Chapter2_13.vue
@@ -18,7 +18,11 @@
       <button class="completeBtn" @click="complete">학습 종료</button>
     </div>
     <div class="flex justify-between align-center">
-      <div class="pre-btn" @click="previousProblem()">
+      <div
+        class="pre-btn"
+        :style="{ visibility: hiddenState ? 'hidden' : 'visible' }"
+        @click="previousProblem()"
+      >
         <img src="../../../../resources/img/left.png" alt="" />
       </div>
       <div class="content title-box">
@@ -147,6 +151,7 @@
       answerArr: [],
 
       seq: this.$store.getters.seqNum,
+      hiddenState: false,
     };
   },
   methods: {
@@ -334,6 +339,9 @@
   },
   mounted() {
     this.fetchProblemData();
+    if (this.currentProblemIndex == 0) {
+      this.hiddenState = true;
+    }
   },
 };
 </script>
client/views/pages/main/Chapter/Chapter2_5.vue
--- client/views/pages/main/Chapter/Chapter2_5.vue
+++ client/views/pages/main/Chapter/Chapter2_5.vue
@@ -18,7 +18,11 @@
       <button class="completeBtn" @click="complete">학습 종료</button>
     </div>
     <div class="flex justify-between align-center">
-      <div class="pre-btn" @click="previousProblem()">
+      <div
+        class="pre-btn"
+        :style="{ visibility: hiddenState ? 'hidden' : 'visible' }"
+        @click="previousProblem()"
+      >
         <img src="../../../../resources/img/left.png" alt="" />
       </div>
       <div class="content title-box">
@@ -123,6 +127,7 @@
       dataList: [],
 
       seq: this.$store.getters.seqNum,
+      hiddenState: false,
     };
   },
   computed: {},
@@ -348,6 +353,10 @@
   },
   mounted() {
     this.getProblem();
+
+    if (this.currentProblemIndex == 0) {
+      this.hiddenState = true;
+    }
   },
 };
 </script>
client/views/pages/main/Chapter/Chapter2_6.vue
--- client/views/pages/main/Chapter/Chapter2_6.vue
+++ client/views/pages/main/Chapter/Chapter2_6.vue
@@ -18,7 +18,11 @@
       <button class="completeBtn" @click="complete">학습 종료</button>
     </div>
     <div class="flex justify-between align-center">
-      <div class="pre-btn" @click="previousProblem()">
+      <div
+        class="pre-btn"
+        :style="{ visibility: hiddenState ? 'hidden' : 'visible' }"
+        @click="previousProblem()"
+      >
         <img src="../../../../resources/img/left.png" alt="" />
       </div>
       <div class="content title-box">
@@ -143,6 +147,7 @@
       answerArr: [],
 
       seq: this.$store.getters.seqNum,
+      hiddenState: false,
     };
   },
   methods: {
@@ -327,6 +332,9 @@
   },
   mounted() {
     this.fetchProblemData();
+    if (this.currentProblemIndex == 0) {
+      this.hiddenState = true;
+    }
   },
 };
 </script>
client/views/pages/main/Chapter/Chapter2_7.vue
--- client/views/pages/main/Chapter/Chapter2_7.vue
+++ client/views/pages/main/Chapter/Chapter2_7.vue
@@ -18,7 +18,11 @@
       <button class="completeBtn" @click="complete">학습 종료</button>
     </div>
     <div class="flex justify-between align-center">
-      <div class="pre-btn" @click="previousProblem()">
+      <div
+        class="pre-btn"
+        :style="{ visibility: hiddenState ? 'hidden' : 'visible' }"
+        @click="previousProblem()"
+      >
         <img src="../../../../resources/img/left.png" alt="" />
       </div>
       <div class="content title-box">
@@ -118,6 +122,7 @@
       answerArr: [],
 
       seq: this.$store.getters.seqNum,
+      hiddenState: false,
     };
   },
   methods: {
@@ -319,6 +324,9 @@
   },
   mounted() {
     this.fetchProblemData();
+    if (this.currentProblemIndex == 0) {
+      this.hiddenState = true;
+    }
   },
 };
 </script>
client/views/pages/main/Chapter/Chapter2_8.vue
--- client/views/pages/main/Chapter/Chapter2_8.vue
+++ client/views/pages/main/Chapter/Chapter2_8.vue
@@ -18,7 +18,11 @@
       <button class="completeBtn" @click="complete">학습 종료</button>
     </div>
     <div class="flex justify-between align-center">
-      <div class="pre-btn" @click="previousProblem()">
+      <div
+        class="pre-btn"
+        :style="{ visibility: hiddenState ? 'hidden' : 'visible' }"
+        @click="previousProblem()"
+      >
         <img src="../../../../resources/img/left.png" alt="" />
       </div>
       <div class="content title-box">
@@ -119,6 +123,7 @@
 
       // prblmArr: [],
       seq: this.$store.getters.seqNum,
+      hiddenState: false,
     };
   },
   methods: {
@@ -328,6 +333,10 @@
     this.fetchProblemData();
     // this.storeProblemId();
     // this.storeLearningId();
+    if (this.currentProblemIndex == 0) {
+      this.hiddenState = true;
+    }
+
     this.$route.query;
     // 드래그 가능한 요소에 드래그 시작 및 종료 이벤트 추가
     document.querySelectorAll(".draggable").forEach((button) => {
Add a comment
List