From cf198eee219b5d684e045110dfbbeb78e5036b46 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Fri, 15 May 2020 18:43:15 +0300 Subject: [PATCH] Router support for menu --- src/AppMenu.vue | 168 ++++++++++++++++--------------- src/assets/styles/app/_menu.scss | 2 +- 2 files changed, 90 insertions(+), 80 deletions(-) diff --git a/src/AppMenu.vue b/src/AppMenu.vue index f1ba841e5..9a6a7d4ea 100755 --- a/src/AppMenu.vue +++ b/src/AppMenu.vue @@ -60,37 +60,39 @@
Carousel - DataTable - -
-
    -
  • Documentation
  • -
  • Basic
  • -
  • Dynamic
  • -
  • Templating
  • -
  • Size
  • -
  • ColGroup
  • -
  • Paginator
  • -
  • Sort
  • -
  • Filter
  • -
  • Selection
  • -
  • Lazy
  • -
  • Scroll
  • -
  • Expand
  • -
  • Edit
  • -
  • ColToggle
  • -
  • ColResize
  • -
  • Reorder
  • -
  • RowGroup
  • -
  • ContextMenu
  • -
  • Responsive
  • -
  • Export
  • -
  • State
  • -
  • Style
  • -
  • Crud
  • -
-
-
+ + DataTable + +
+
    +
  • Documentation
  • +
  • Basic
  • +
  • Dynamic
  • +
  • Templating
  • +
  • Size
  • +
  • ColGroup
  • +
  • Paginator
  • +
  • Sort
  • +
  • Filter
  • +
  • Selection
  • +
  • Lazy
  • +
  • Scroll
  • +
  • Expand
  • +
  • Edit
  • +
  • ColToggle
  • +
  • ColResize
  • +
  • Reorder
  • +
  • RowGroup
  • +
  • ContextMenu
  • +
  • Responsive
  • +
  • Export
  • +
  • State
  • +
  • Style
  • +
  • Crud
  • +
+
+
+
DataView FullCalendar @@ -98,37 +100,40 @@ OrganizationChart Paginator PickList - Tree - -
-
    -
  • Documentation
  • -
  • Selection
  • -
  • Lazy
  • -
  • Templating
  • -
  • Filter
  • -
-
-
- - TreeTable - -
-
    -
  • Documentation
  • -
  • Templating
  • -
  • Size
  • -
  • Paginator
  • -
  • Sort
  • -
  • Filter
  • -
  • Selection
  • -
  • Lazy
  • -
  • ColToggle
  • -
  • Resize
  • -
  • Responsive
  • -
-
-
+ + Tree + +
+
    +
  • Documentation
  • +
  • Selection
  • +
  • Lazy
  • +
  • Templating
  • +
  • Filter
  • +
+
+
+
+ + TreeTable + +
+
    +
  • Documentation
  • +
  • Templating
  • +
  • Size
  • +
  • Paginator
  • +
  • Sort
  • +
  • Filter
  • +
  • Selection
  • +
  • Lazy
  • +
  • ColToggle
  • +
  • Resize
  • +
  • Responsive
  • +
+
+
+
@@ -210,23 +215,25 @@ Image
- Galleria - -
-
    -
  • Documentation
  • -
  • Programmatic
  • -
  • Indicator
  • -
  • Thumbnail
  • -
  • Navigator
  • -
  • Responsive
  • -
  • FullScreen
  • -
  • AutoPlay
  • -
  • Caption
  • -
  • Advanced
  • -
-
-
+ + Galleria + +
+
    +
  • Documentation
  • +
  • Programmatic
  • +
  • Indicator
  • +
  • Thumbnail
  • +
  • Navigator
  • +
  • Responsive
  • +
  • FullScreen
  • +
  • AutoPlay
  • +
  • Caption
  • +
  • Advanced
  • +
+
+
+
@@ -261,6 +268,9 @@ export default { this.activeSubmenus[name] = this.activeSubmenus[name] ? false: true; this.activeSubmenus = {...this.activeSubmenus}; event.preventDefault(); + }, + isSubmenuActive(name, routerIsActive) { + return this.activeSubmenus.hasOwnProperty(name) ? this.activeSubmenus[name] : routerIsActive; } } } diff --git a/src/assets/styles/app/_menu.scss b/src/assets/styles/app/_menu.scss index 98332d9cf..6bbe84dfa 100644 --- a/src/assets/styles/app/_menu.scss +++ b/src/assets/styles/app/_menu.scss @@ -59,7 +59,7 @@ } } - > div { + div { &.router-link-exact-active { > a { font-weight: 700;