Router support for menu
parent
0ae04152c1
commit
cf198eee21
168
src/AppMenu.vue
168
src/AppMenu.vue
|
@ -60,37 +60,39 @@
|
||||||
</span>
|
</span>
|
||||||
<div>
|
<div>
|
||||||
<router-link to="/carousel">Carousel</router-link>
|
<router-link to="/carousel">Carousel</router-link>
|
||||||
<a tabindex="0" @click="toggleSubmenu($event, 'datatable')">DataTable</a>
|
<router-link to="/datatable" v-slot="{ href, route, navigate, isActive }">
|
||||||
<transition name="p-toggleable-content">
|
<a tabindex="0" @click="toggleSubmenu($event, 'datatable')">DataTable</a>
|
||||||
<div class="p-toggleable-content" v-show="activeSubmenus['datatable'] === true">
|
<transition name="p-toggleable-content">
|
||||||
<ul>
|
<div class="p-toggleable-content" v-show="isSubmenuActive('datatable', isActive)">
|
||||||
<li><router-link to="/datatable">Documentation</router-link></li>
|
<ul>
|
||||||
<li><router-link to="/datatable/basic">Basic</router-link></li>
|
<li><router-link to="/datatable">Documentation</router-link></li>
|
||||||
<li><router-link to="/datatable/dynamiccolumns">Dynamic</router-link></li>
|
<li><router-link to="/datatable/basic">Basic</router-link></li>
|
||||||
<li><router-link to="/datatable/templating">Templating</router-link></li>
|
<li><router-link to="/datatable/dynamiccolumns">Dynamic</router-link></li>
|
||||||
<li><router-link to="/datatable/size">Size</router-link></li>
|
<li><router-link to="/datatable/templating">Templating</router-link></li>
|
||||||
<li><router-link to="/datatable/colgroup">ColGroup</router-link></li>
|
<li><router-link to="/datatable/size">Size</router-link></li>
|
||||||
<li><router-link to="/datatable/paginator">Paginator</router-link></li>
|
<li><router-link to="/datatable/colgroup">ColGroup</router-link></li>
|
||||||
<li><router-link to="/datatable/sort">Sort</router-link></li>
|
<li><router-link to="/datatable/paginator">Paginator</router-link></li>
|
||||||
<li><router-link to="/datatable/filter">Filter</router-link></li>
|
<li><router-link to="/datatable/sort">Sort</router-link></li>
|
||||||
<li><router-link to="/datatable/selection">Selection</router-link></li>
|
<li><router-link to="/datatable/filter">Filter</router-link></li>
|
||||||
<li><router-link to="/datatable/lazy">Lazy</router-link></li>
|
<li><router-link to="/datatable/selection">Selection</router-link></li>
|
||||||
<li><router-link to="/datatable/scroll">Scroll</router-link></li>
|
<li><router-link to="/datatable/lazy">Lazy</router-link></li>
|
||||||
<li><router-link to="/datatable/rowexpand">Expand</router-link></li>
|
<li><router-link to="/datatable/scroll">Scroll</router-link></li>
|
||||||
<li><router-link to="/datatable/edit">Edit</router-link></li>
|
<li><router-link to="/datatable/rowexpand">Expand</router-link></li>
|
||||||
<li><router-link to="/datatable/coltoggle">ColToggle</router-link></li>
|
<li><router-link to="/datatable/edit">Edit</router-link></li>
|
||||||
<li><router-link to="/datatable/colresize">ColResize</router-link></li>
|
<li><router-link to="/datatable/coltoggle">ColToggle</router-link></li>
|
||||||
<li><router-link to="/datatable/reorder">Reorder</router-link></li>
|
<li><router-link to="/datatable/colresize">ColResize</router-link></li>
|
||||||
<li><router-link to="/datatable/rowgroup">RowGroup</router-link></li>
|
<li><router-link to="/datatable/reorder">Reorder</router-link></li>
|
||||||
<li><router-link to="/datatable/contextmenu">ContextMenu</router-link></li>
|
<li><router-link to="/datatable/rowgroup">RowGroup</router-link></li>
|
||||||
<li><router-link to="/datatable/responsive">Responsive</router-link></li>
|
<li><router-link to="/datatable/contextmenu">ContextMenu</router-link></li>
|
||||||
<li><router-link to="/datatable/export">Export</router-link></li>
|
<li><router-link to="/datatable/responsive">Responsive</router-link></li>
|
||||||
<li><router-link to="/datatable/state">State</router-link></li>
|
<li><router-link to="/datatable/export">Export</router-link></li>
|
||||||
<li><router-link to="/datatable/style">Style</router-link></li>
|
<li><router-link to="/datatable/state">State</router-link></li>
|
||||||
<li><router-link to="/datatable/crud">Crud</router-link></li>
|
<li><router-link to="/datatable/style">Style</router-link></li>
|
||||||
</ul>
|
<li><router-link to="/datatable/crud">Crud</router-link></li>
|
||||||
</div>
|
</ul>
|
||||||
</transition>
|
</div>
|
||||||
|
</transition>
|
||||||
|
</router-link>
|
||||||
|
|
||||||
<router-link to="/dataview">DataView</router-link>
|
<router-link to="/dataview">DataView</router-link>
|
||||||
<router-link to="/fullcalendar">FullCalendar</router-link>
|
<router-link to="/fullcalendar">FullCalendar</router-link>
|
||||||
|
@ -98,37 +100,40 @@
|
||||||
<router-link to="/organizationchart">OrganizationChart</router-link>
|
<router-link to="/organizationchart">OrganizationChart</router-link>
|
||||||
<router-link to="/paginator">Paginator</router-link>
|
<router-link to="/paginator">Paginator</router-link>
|
||||||
<router-link to="/picklist">PickList</router-link>
|
<router-link to="/picklist">PickList</router-link>
|
||||||
<a tabindex="0" @click="toggleSubmenu($event, 'tree')">Tree</a>
|
<router-link to="/tree" v-slot="{ href, route, navigate, isActive }">
|
||||||
<transition name="p-toggleable-content">
|
<a tabindex="0" @click="toggleSubmenu($event, 'tree')">Tree</a>
|
||||||
<div class="p-toggleable-content" v-show="activeSubmenus['tree']">
|
<transition name="p-toggleable-content">
|
||||||
<ul>
|
<div class="p-toggleable-content" v-show="isSubmenuActive('tree', isActive)">
|
||||||
<li><router-link to="/tree">Documentation</router-link></li>
|
<ul>
|
||||||
<li><router-link to="/tree/selection">Selection</router-link></li>
|
<li><router-link to="/tree">Documentation</router-link></li>
|
||||||
<li><router-link to="/tree/lazy">Lazy</router-link></li>
|
<li><router-link to="/tree/selection">Selection</router-link></li>
|
||||||
<li><router-link to="/tree/templating">Templating</router-link></li>
|
<li><router-link to="/tree/lazy">Lazy</router-link></li>
|
||||||
<li><router-link to="/tree/filter">Filter</router-link></li>
|
<li><router-link to="/tree/templating">Templating</router-link></li>
|
||||||
</ul>
|
<li><router-link to="/tree/filter">Filter</router-link></li>
|
||||||
</div>
|
</ul>
|
||||||
</transition>
|
</div>
|
||||||
|
</transition>
|
||||||
<a tabindex="0" @click="toggleSubmenu($event, 'treetable')">TreeTable</a>
|
</router-link>
|
||||||
<transition name="p-toggleable-content">
|
<router-link to="/treetable" v-slot="{ href, route, navigate, isActive }">
|
||||||
<div class="p-toggleable-content" v-show="activeSubmenus['treetable']">
|
<a tabindex="0" @click="toggleSubmenu($event, 'treetable')">TreeTable</a>
|
||||||
<ul>
|
<transition name="p-toggleable-content">
|
||||||
<li><router-link to="/treetable">Documentation</router-link></li>
|
<div class="p-toggleable-content" v-show="isSubmenuActive('treetable', isActive)">
|
||||||
<li><router-link to="/treetable/templating">Templating</router-link></li>
|
<ul>
|
||||||
<li><router-link to="/treetable/size">Size</router-link></li>
|
<li><router-link to="/treetable">Documentation</router-link></li>
|
||||||
<li><router-link to="/treetable/paginator">Paginator</router-link></li>
|
<li><router-link to="/treetable/templating">Templating</router-link></li>
|
||||||
<li><router-link to="/treetable/sort">Sort</router-link></li>
|
<li><router-link to="/treetable/size">Size</router-link></li>
|
||||||
<li><router-link to="/treetable/filter">Filter</router-link></li>
|
<li><router-link to="/treetable/paginator">Paginator</router-link></li>
|
||||||
<li><router-link to="/treetable/selection">Selection</router-link></li>
|
<li><router-link to="/treetable/sort">Sort</router-link></li>
|
||||||
<li><router-link to="/treetable/lazy">Lazy</router-link></li>
|
<li><router-link to="/treetable/filter">Filter</router-link></li>
|
||||||
<li><router-link to="/treetable/coltoggle">ColToggle</router-link></li>
|
<li><router-link to="/treetable/selection">Selection</router-link></li>
|
||||||
<li><router-link to="/treetable/colresize">Resize</router-link></li>
|
<li><router-link to="/treetable/lazy">Lazy</router-link></li>
|
||||||
<li><router-link to="/treetable/responsive">Responsive</router-link></li>
|
<li><router-link to="/treetable/coltoggle">ColToggle</router-link></li>
|
||||||
</ul>
|
<li><router-link to="/treetable/colresize">Resize</router-link></li>
|
||||||
</div>
|
<li><router-link to="/treetable/responsive">Responsive</router-link></li>
|
||||||
</transition>
|
</ul>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
|
@ -210,23 +215,25 @@
|
||||||
<span>Image</span>
|
<span>Image</span>
|
||||||
</span>
|
</span>
|
||||||
<div>
|
<div>
|
||||||
<a tabindex="0" @click="toggleSubmenu($event, 'galleria')">Galleria</a>
|
<router-link to="/galleria" v-slot="{ href, route, navigate, isActive }">
|
||||||
<transition name="p-toggleable-content">
|
<a tabindex="0" @click="toggleSubmenu($event, 'galleria')">Galleria</a>
|
||||||
<div class="p-toggleable-content" v-show="activeSubmenus['galleria']">
|
<transition name="p-toggleable-content">
|
||||||
<ul>
|
<div class="p-toggleable-content" v-show="isSubmenuActive('galleria', isActive)">
|
||||||
<li><router-link to="/galleria">Documentation</router-link></li>
|
<ul>
|
||||||
<li><router-link to="/galleria/programmatic">Programmatic</router-link></li>
|
<li><router-link to="/galleria">Documentation</router-link></li>
|
||||||
<li><router-link to="/galleria/indicator">Indicator</router-link></li>
|
<li><router-link to="/galleria/programmatic">Programmatic</router-link></li>
|
||||||
<li><router-link to="/galleria/thumbnail">Thumbnail</router-link></li>
|
<li><router-link to="/galleria/indicator">Indicator</router-link></li>
|
||||||
<li><router-link to="/galleria/navigator">Navigator</router-link></li>
|
<li><router-link to="/galleria/thumbnail">Thumbnail</router-link></li>
|
||||||
<li><router-link to="/galleria/responsive">Responsive</router-link></li>
|
<li><router-link to="/galleria/navigator">Navigator</router-link></li>
|
||||||
<li><router-link to="/galleria/fullscreen">FullScreen</router-link></li>
|
<li><router-link to="/galleria/responsive">Responsive</router-link></li>
|
||||||
<li><router-link to="/galleria/autoplay">AutoPlay</router-link></li>
|
<li><router-link to="/galleria/fullscreen">FullScreen</router-link></li>
|
||||||
<li><router-link to="/galleria/caption">Caption</router-link></li>
|
<li><router-link to="/galleria/autoplay">AutoPlay</router-link></li>
|
||||||
<li><router-link to="/galleria/advanced">Advanced</router-link></li>
|
<li><router-link to="/galleria/caption">Caption</router-link></li>
|
||||||
</ul>
|
<li><router-link to="/galleria/advanced">Advanced</router-link></li>
|
||||||
</div>
|
</ul>
|
||||||
</transition>
|
</div>
|
||||||
|
</transition>
|
||||||
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
|
@ -261,6 +268,9 @@ export default {
|
||||||
this.activeSubmenus[name] = this.activeSubmenus[name] ? false: true;
|
this.activeSubmenus[name] = this.activeSubmenus[name] ? false: true;
|
||||||
this.activeSubmenus = {...this.activeSubmenus};
|
this.activeSubmenus = {...this.activeSubmenus};
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
},
|
||||||
|
isSubmenuActive(name, routerIsActive) {
|
||||||
|
return this.activeSubmenus.hasOwnProperty(name) ? this.activeSubmenus[name] : routerIsActive;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> div {
|
div {
|
||||||
&.router-link-exact-active {
|
&.router-link-exact-active {
|
||||||
> a {
|
> a {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|
Loading…
Reference in New Issue