
--- client/views/component/Breadcrumb/Breadcrumb.vue
+++ client/views/component/Breadcrumb/Breadcrumb.vue
... | ... | @@ -31,7 +31,7 @@ |
31 | 31 |
this.generateBreadcrumb(); |
32 | 32 |
} |
33 | 33 |
} |
34 |
- } |
|
34 |
+ }, |
|
35 | 35 |
}, |
36 | 36 |
methods: { |
37 | 37 |
generateBreadcrumb() { |
... | ... | @@ -42,7 +42,10 @@ |
42 | 42 |
const findFromTree = (menus, path, trail = []) => { |
43 | 43 |
for (const menu of menus) { |
44 | 44 |
const newTrail = [...trail, menu]; |
45 |
- if (menu.routerUrl === path) return newTrail; |
|
45 |
+ if (menu.routerUrl === path) { |
|
46 |
+ this.$store.commit('setMenu', menu); |
|
47 |
+ return newTrail; |
|
48 |
+ } |
|
46 | 49 |
if (menu.childList?.length) { |
47 | 50 |
const found = findFromTree(menu.childList, path, newTrail); |
48 | 51 |
if (found) return found; |
... | ... | @@ -56,6 +59,8 @@ |
56 | 59 |
const findCurrent = flatMenus.find(menu => menu.routerUrl === path); |
57 | 60 |
if (!findCurrent) return []; |
58 | 61 |
|
62 |
+ this.$store.commit('setMenu', findCurrent); |
|
63 |
+ |
|
59 | 64 |
const buildTrail = (menu, trail = []) => { |
60 | 65 |
const parent = flatMenus.find(m => m.menuId === menu.upMenuId); |
61 | 66 |
if (parent) { |
--- client/views/pages/App.vue
+++ client/views/pages/App.vue
... | ... | @@ -4,8 +4,9 @@ |
4 | 4 |
<AdminMenu /> |
5 | 5 |
<main class="main-wrap"> |
6 | 6 |
<div :class="{'content-wrap': true, 'main': this.$route.path === this.$filters.ctxPath('/adm/main.page')}"> |
7 |
- <!-- <MenuSatisfaction/> --> |
|
7 |
+ <MenuSatisfaction/> <!-- 내용 확인용 --> |
|
8 | 8 |
<router-view /> |
9 |
+ <!-- <MenuSatisfaction/> --> <!-- 진짜 위치 --> |
|
9 | 10 |
</div> |
10 | 11 |
</main> |
11 | 12 |
</div> |
... | ... | @@ -14,7 +15,7 @@ |
14 | 15 |
<main class="main-wrap"> |
15 | 16 |
<Breadcrumb v-if="$route.path !== this.$filters.ctxPath('/adm/main.page') && $route.path !== this.$filters.ctxPath('/main.page')" /> |
16 | 17 |
<router-view /> |
17 |
- <!-- <MenuSatisfaction/> --> |
|
18 |
+ <MenuSatisfaction/> |
|
18 | 19 |
</main> |
19 | 20 |
</div> |
20 | 21 |
</template> |
--- client/views/pages/AppStore.js
+++ client/views/pages/AppStore.js
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 |
|
5 | 5 |
export default createStore({ |
6 | 6 |
plugins: [createPersistedState({ |
7 |
- paths: ['loginMode', 'authorization', 'mbrId', 'mbrNm', 'roles', 'contextPath'] |
|
7 |
+ paths: ['loginMode', 'authorization', 'mbrId', 'mbrNm', 'roles', 'contextPath', 'pageAuth'] |
|
8 | 8 |
})], |
9 | 9 |
state: { |
10 | 10 |
authorization: null, |
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?