-
Notifications
You must be signed in to change notification settings - Fork 2
/
Header2.vue
47 lines (44 loc) · 1.43 KB
/
Header2.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<template>
<div class="oj-flex-bar oj-web-applayout-max-width oj-sm-align-items-center">
<div id="navigationlist" class='oj-flex-bar-end oj-sm-only-hide oj-md-condense'>
<ul class='oj-md-justify-content-flex-end oj-web-applayout-navbar'>
<li v-bind:id='link.id' v-for='link in links'>
<router-link v-bind:to='link.path'
class="oj-navigationlist-focused-element oj-navigationlist-item-content">
<span v-bind:class='link.iconClass'></span>
<span>{{link.name}}</span>
</router-link>
</li>
</ul>
</div>
</div>
</template>
<script>
define(['Vue', 'vue_router', 'routes', 'routes'],
function (Vue, VueRouter, AppRoutes, routes) {
Vue.use(VueRouter);
var router = new VueRouter({
mode: 'hash',
routes: AppRoutes
});
Vue.component('Header2', {
template: template,
router: router,
data: function () {
return {
links: routes
};
},
mounted() {
$('#navigationlist').ojNavigationList({
selection: 'dashboard',
optionChange: (event, ui) => {
selection: ui['value'];
},
edge: 'top',
navigationLevel: 'application'
});
}
});
});
</script>