wt-navigation-bar.vue
Specs
Props
| Name | Required | Types | Default | Description | Example | Deprecated |
|---|---|---|---|---|---|---|
currentApp |
string |
WtApplication.Admin |
Currently opened app | |||
nav |
Array |
() => [] |
Should receive array of nav objects. All objects should have following properties: "value" -- main inner logic property, should be unique. "name" -- display name. If none, displays "value" property. "route" -- relative path, used for :to attr in router-link component. "subNav": array of objects, with properties, described above. If expansion has route, and subNav has route, subNav route computes like nav.route + / + subnav.route |
|||
darkMode |
boolean |
false |
Dark mode flag | |||
logoRoute |
string |
'' |
Logo route path |
Example NavigationBar
Code
vue
<script setup>
const currentApp = 'history';
const nav = [
{ value: '1', name: 'Name 1', route: '/1' },
{
value: 'exp1',
name: 'Expansion 1',
subNav: [
{ value: '2', name: 'Name 2', route: '/2' },
{ value: '3', name: 'Name 3', route: '/3' },
],
},
{
value: 'exp2',
name: 'Expansion 2',
subNav: [
{ value: '4', name: 'Name 4', route: '/4' },
{ value: '5', name: 'Name 5', route: '/5' },
],
},
];
</script>
<template>
<wt-navigation-bar
:current-app="currentApp"
:nav="nav"
/>
</template>
<style scoped>
.wt-navigation-bar :deep(.wt-navigation-bar__nav) {
z-index: 1001;
}
</style>