yjryu / KERIS star
류윤주 류윤주 2023-11-09
231109 류윤주 관리자단 커밋
@caa64aa3e0d14e9671669e7a7df5d112d3b2838e
client/views/layout/AdminMenu.vue
--- client/views/layout/AdminMenu.vue
+++ client/views/layout/AdminMenu.vue
@@ -54,6 +54,22 @@
         }
       }
     },
+    // url에 따른 메뉴
+    updateActiveMenu(currentPath) {
+      this.menuList.forEach((item) => {
+        // 주요 메뉴의 path와 현재 경로를 비교
+        if (item.path === currentPath) {
+          item.isActive = true;
+        } else {
+          // 하위 메뉴가 있는 경우, 하위 메뉴의 path와 현재 경로를 비교
+          if (item.subMenu && item.subMenu.some(sub => sub.path === currentPath)) {
+            item.isActive = true;
+          } else {
+            item.isActive = false;
+          }
+        }
+      });
+    },
     // 하위메뉴 클릭 시 메뉴 닫힘 방지
     stopToggleSubMenuClick(event) {
       event.stopPropagation();
@@ -64,6 +80,7 @@
   components: {},
   mounted() {
     console.log("admin menu mounted");
+    this.updateActiveMenu(this.$route.path);
   },
 };
 </script>
client/views/pages/admin/user/UserSelectList.vue
--- client/views/pages/admin/user/UserSelectList.vue
+++ client/views/pages/admin/user/UserSelectList.vue
@@ -93,6 +93,9 @@
                         <div class="btn-wrap">
                             <button class="blue-btn" @click="modalType = 'userInsert'">등록</button>
                         </div>
+                        <div class="flex-center">
+                            <PaginationButton />
+                        </div>
                     </div>
                 </div>
             </div>
@@ -145,6 +148,7 @@
 import axios from "axios";
 import crypto from "crypto-js";
 import COMMON_UTIL from '../../../../resources/js/commonUtil.js';
+import PaginationButton from "../../../component/pagination/PaginationButton.vue";
 
 
 export default {
@@ -465,7 +469,9 @@
         },
     },
     computed: {},
-    components: {},
+    components: {
+        'PaginationButton':PaginationButton,
+    },
     mounted() {
         this.managerSelectList();
         this.userSelectList();
Add a comment
List