박정하 박정하 04-15
250415 박정하 썸네일 체크박스 선택 오류 개선
@25a83da0b70a6ba22c9c1ec8b37a48e7c410e4f0
client/views/layout/Header.vue
--- client/views/layout/Header.vue
+++ client/views/layout/Header.vue
@@ -11,21 +11,17 @@
               <li @mouseover="showSubmenu('MENU_00000001')" @mouseleave="hideSubmenu('MENU_00000001')">
                 <p :class="{ 'active-menu': this.$route.path.startsWith('/PicHistory') || this.$route.path.startsWith('/VideoHistory') }">기록물</p>
                 <div class="submenu" v-if="submenuVisible['MENU_00000001']" @mouseover="showSubmenu('MENU_00000001')" @mouseleave="hideSubmenu('MENU_00000001')">
-                  <p :class="{ 'now-menu': this.$route.path.startsWith('/PicHistory') }">• <router-link :to="{ path: '/PicHistorySearch.page' }" @click="hideSubmenu('MENU_00000001')"> 사진 기록물 </router-link>
-                  </p>
+                  <p :class="{ 'now-menu': this.$route.path.startsWith('/PicHistory') }" @click="moveTo('/PicHistorySearch.page', 'MENU_00000001')">• 사진 기록물</p>
                   <div class="hr"></div>
-                  <p :class="{ 'now-menu': this.$route.path.startsWith('/VideoHistory') }">• <router-link :to="{ path: '/VideoHistorySearch.page' }" @click="hideSubmenu('MENU_00000001')"> 영상 기록물 </router-link>
-                  </p>
+                  <p :class="{ 'now-menu': this.$route.path.startsWith('/VideoHistory') }" @click="moveTo('/VideoHistorySearch.page', 'MENU_00000001')">• 영상 기록물</p>
                 </div>
               </li>
               <li @mouseover="showSubmenu('MENU_00000004')" @mouseleave="hideSubmenu('MENU_00000004')">
                 <p :class="{ 'active-menu': this.$route.path.startsWith('/MediaVideo') || this.$route.path.startsWith('/NewsRelease') }">언론에서 바라본 구미시</p>
                 <div class="submenu" v-if="submenuVisible['MENU_00000004']" @mouseover="showSubmenu('MENU_00000004')" @mouseleave="hideSubmenu('MENU_00000004')">
-                  <p :class="{ 'now-menu': this.$route.path.startsWith('/MediaVideo') }">• <router-link :to="{ path: '/MediaVideoSearch.page' }" @click="hideSubmenu('MENU_00000004')"> 미디어 영상 </router-link>
-                  </p>
+                  <p :class="{ 'now-menu': this.$route.path.startsWith('/MediaVideo') }" @click="moveTo('/MediaVideoSearch.page', 'MENU_00000004')">• 미디어 영상</p>
                   <div class="hr"></div>
-                  <p :class="{ 'now-menu': this.$route.path.startsWith('/NewsRelease') }">• <router-link :to="{ path: '/NewsReleaseSearch.page' }" @click="hideSubmenu('MENU_00000004')"> 보도자료 </router-link>
-                  </p>
+                  <p :class="{ 'now-menu': this.$route.path.startsWith('/NewsRelease') }" @click="moveTo('/NewsReleaseSearch.page', 'MENU_00000004')">• 보도자료</p>
                 </div>
               </li>
               <template v-if="$store.state.roles[0]?.authority === 'ROLE_ADMIN'">
@@ -140,6 +136,11 @@
       }
     },
 
+    moveTo(path, menuId) {
+      this.hideSubmenu(menuId);
+      this.$router.push({ path });
+    },
+
     logout() {
       // 백엔드 로그아웃 API 호출
       logOutProc()
client/views/pages/bbsDcry/photo/PicHistoryDetail.vue
--- client/views/pages/bbsDcry/photo/PicHistoryDetail.vue
+++ client/views/pages/bbsDcry/photo/PicHistoryDetail.vue
@@ -35,8 +35,13 @@
           <div class="thumbnail">
             <swiper @swiper="setThumbsSwiper" :spaceBetween="20" :slidesPerView="4" :freeMode="true" :watchSlidesProgress="true" :modules="modules" :navigation="true" class="mySwiper">
               <swiper-slide v-for="(item, idx) of findResult.files" :key="idx">
-                <input type="checkbox" :id="'photo_' + idx" :value="item" v-model="selectedFiles" @click.stop />
-                <img :src="item.filePath" :alt="item.fileNm" />
+                <div class="thumbnail-wrapper">
+                  <div class="checkbox-container" @click.stop>
+                    <input type="checkbox" :id="'photo_' + idx" :value="item" v-model="selectedFiles" />
+                    <label :for="'photo_' + idx"></label>
+                  </div>
+                  <img :src="item.filePath" :alt="item.fileNm" />
+                </div>
               </swiper-slide>
             </swiper>
           </div>
@@ -92,17 +97,15 @@
   </div>
 </template>
 <script>
+// Swiper
 import { ref } from 'vue';
-// Import Swiper Vue components
-import { CaretRightOutlined, PauseOutlined } from '@ant-design/icons-vue';
 import { Swiper, SwiperSlide } from 'swiper/vue';
-// Import Swiper styles
+import { FreeMode, Navigation, Thumbs } from 'swiper/modules';
+import { CaretRightOutlined, PauseOutlined } from '@ant-design/icons-vue';
 import 'swiper/css';
 import 'swiper/css/free-mode';
 import 'swiper/css/navigation';
 import 'swiper/css/thumbs';
-// import required modules
-import { FreeMode, Navigation, Thumbs } from 'swiper/modules';
 // COMPONENT
 import ViewerComponent from '../../../component/editor/ViewerComponent.vue';
 // API
@@ -111,10 +114,10 @@
 
 export default {
   components: {
-    PauseOutlined,
-    CaretRightOutlined,
     Swiper,
     SwiperSlide,
+    PauseOutlined,
+    CaretRightOutlined,
     ViewerComponent,
   },
 
@@ -126,9 +129,9 @@
     };
 
     return {
+      modules: [FreeMode, Navigation, Thumbs],
       thumbsSwiper,
       setThumbsSwiper,
-      modules: [FreeMode, Navigation, Thumbs],
     };
   },
 
Add a comment
List