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