
--- client/views/component/Breadcrumb/Breadcrumb.vue
+++ client/views/component/Breadcrumb/Breadcrumb.vue
... | ... | @@ -16,19 +16,27 @@ |
16 | 16 |
}; |
17 | 17 |
}, |
18 | 18 |
watch: { |
19 |
+ // 페이지 이동 시 동작 |
|
19 | 20 |
$route: { |
20 | 21 |
immediate: true, |
21 | 22 |
handler() { |
22 | 23 |
this.generateBreadcrumb(); |
23 | 24 |
} |
25 |
+ }, |
|
26 |
+ // 새로고침 시 동작 |
|
27 |
+ '$store.state.menuList': { |
|
28 |
+ immediate: true, |
|
29 |
+ handler(val) { |
|
30 |
+ if (val && val.length > 0) { |
|
31 |
+ this.generateBreadcrumb(); |
|
32 |
+ } |
|
24 | 33 |
} |
34 |
+ } |
|
25 | 35 |
}, |
26 | 36 |
methods: { |
27 | 37 |
generateBreadcrumb() { |
28 | 38 |
const menuState = this.$store.state; |
29 | 39 |
const currentPath = this.$route.path; |
30 |
- |
|
31 |
- console.log('menuState',menuState) |
|
32 | 40 |
|
33 | 41 |
// 관리자: childList 기반 |
34 | 42 |
const findFromTree = (menus, path, trail = []) => { |
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?