
--- client/views/layout/AdminMenu.vue
+++ client/views/layout/AdminMenu.vue
... | ... | @@ -54,6 +54,22 @@ |
54 | 54 |
} |
55 | 55 |
} |
56 | 56 |
}, |
57 |
+ // url에 따른 메뉴 |
|
58 |
+ updateActiveMenu(currentPath) { |
|
59 |
+ this.menuList.forEach((item) => { |
|
60 |
+ // 주요 메뉴의 path와 현재 경로를 비교 |
|
61 |
+ if (item.path === currentPath) { |
|
62 |
+ item.isActive = true; |
|
63 |
+ } else { |
|
64 |
+ // 하위 메뉴가 있는 경우, 하위 메뉴의 path와 현재 경로를 비교 |
|
65 |
+ if (item.subMenu && item.subMenu.some(sub => sub.path === currentPath)) { |
|
66 |
+ item.isActive = true; |
|
67 |
+ } else { |
|
68 |
+ item.isActive = false; |
|
69 |
+ } |
|
70 |
+ } |
|
71 |
+ }); |
|
72 |
+ }, |
|
57 | 73 |
// 하위메뉴 클릭 시 메뉴 닫힘 방지 |
58 | 74 |
stopToggleSubMenuClick(event) { |
59 | 75 |
event.stopPropagation(); |
... | ... | @@ -64,6 +80,7 @@ |
64 | 80 |
components: {}, |
65 | 81 |
mounted() { |
66 | 82 |
console.log("admin menu mounted"); |
83 |
+ this.updateActiveMenu(this.$route.path); |
|
67 | 84 |
}, |
68 | 85 |
}; |
69 | 86 |
</script> |
--- client/views/pages/admin/user/UserSelectList.vue
+++ client/views/pages/admin/user/UserSelectList.vue
... | ... | @@ -93,6 +93,9 @@ |
93 | 93 |
<div class="btn-wrap"> |
94 | 94 |
<button class="blue-btn" @click="modalType = 'userInsert'">등록</button> |
95 | 95 |
</div> |
96 |
+ <div class="flex-center"> |
|
97 |
+ <PaginationButton /> |
|
98 |
+ </div> |
|
96 | 99 |
</div> |
97 | 100 |
</div> |
98 | 101 |
</div> |
... | ... | @@ -145,6 +148,7 @@ |
145 | 148 |
import axios from "axios"; |
146 | 149 |
import crypto from "crypto-js"; |
147 | 150 |
import COMMON_UTIL from '../../../../resources/js/commonUtil.js'; |
151 |
+import PaginationButton from "../../../component/pagination/PaginationButton.vue"; |
|
148 | 152 |
|
149 | 153 |
|
150 | 154 |
export default { |
... | ... | @@ -465,7 +469,9 @@ |
465 | 469 |
}, |
466 | 470 |
}, |
467 | 471 |
computed: {}, |
468 |
- components: {}, |
|
472 |
+ components: { |
|
473 |
+ 'PaginationButton':PaginationButton, |
|
474 |
+ }, |
|
469 | 475 |
mounted() { |
470 | 476 |
this.managerSelectList(); |
471 | 477 |
this.userSelectList(); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?