|
Link Here
|
| 1 |
<template> |
1 |
<template> |
| 2 |
<aside> |
2 |
<aside> |
| 3 |
<div class="sidebar_menu"> |
3 |
<div class="sidebar_menu"> |
| 4 |
<h5>{{ $__(title) }}</h5> |
4 |
<VendorMenu v-if="leftNavigation === 'VendorMenu'" /> |
| 5 |
<ul> |
5 |
<AcquisitionsMenu |
| 6 |
<NavigationItem |
6 |
v-else-if="leftNavigation === 'AcquisitionsMenu'" |
| 7 |
v-for="(item, key) in navigationTree" |
7 |
/> |
| 8 |
v-bind:key="key" |
8 |
<template v-else> |
| 9 |
:item="item" |
9 |
<h5>{{ $__(title) }}</h5> |
| 10 |
></NavigationItem> |
10 |
<ul> |
| 11 |
</ul> |
11 |
<NavigationItem |
|
|
12 |
v-for="(item, key) in leftNavigation" |
| 13 |
v-bind:key="key" |
| 14 |
:item="item" |
| 15 |
></NavigationItem> |
| 16 |
</ul> |
| 17 |
</template> |
| 12 |
</div> |
18 |
</div> |
| 13 |
<!-- /.sidebar_menu --> |
19 |
<!-- /.sidebar_menu --> |
| 14 |
</aside> |
20 |
</aside> |
|
Link Here
|
| 17 |
<script> |
23 |
<script> |
| 18 |
import { inject } from "vue"; |
24 |
import { inject } from "vue"; |
| 19 |
import NavigationItem from "./NavigationItem.vue"; |
25 |
import NavigationItem from "./NavigationItem.vue"; |
|
|
26 |
import VendorMenu from "./Islands/VendorMenu.vue"; |
| 27 |
import { storeToRefs } from "pinia"; |
| 28 |
import AcquisitionsMenu from "./Islands/AcquisitionsMenu.vue"; |
| 29 |
|
| 20 |
export default { |
30 |
export default { |
| 21 |
name: "LeftMenu", |
31 |
name: "LeftMenu", |
| 22 |
data() { |
|
|
| 23 |
return { |
| 24 |
navigationTree: this.leftNavigation, |
| 25 |
}; |
| 26 |
}, |
| 27 |
setup: () => { |
32 |
setup: () => { |
| 28 |
const navigationStore = inject("navigationStore"); |
33 |
const navigationStore = inject("navigationStore"); |
| 29 |
const { leftNavigation } = navigationStore; |
34 |
const { leftNavigation } = storeToRefs(navigationStore); |
| 30 |
return { |
35 |
return { |
| 31 |
leftNavigation, |
36 |
leftNavigation, |
| 32 |
}; |
37 |
}; |
| 33 |
}, |
38 |
}, |
| 34 |
async beforeMount() { |
39 |
async beforeMount() { |
| 35 |
if (this.condition) |
40 |
if (this.condition) this.condition(this.leftNavigation); |
| 36 |
this.navigationTree = await this.condition(this.navigationTree); |
|
|
| 37 |
}, |
41 |
}, |
| 38 |
props: { |
42 |
props: { |
| 39 |
title: String, |
43 |
title: String, |
|
Link Here
|
| 41 |
}, |
45 |
}, |
| 42 |
components: { |
46 |
components: { |
| 43 |
NavigationItem, |
47 |
NavigationItem, |
|
|
48 |
VendorMenu, |
| 49 |
AcquisitionsMenu, |
| 44 |
}, |
50 |
}, |
| 45 |
}; |
51 |
}; |
| 46 |
</script> |
52 |
</script> |