[go: up one dir, main page]

Skip to content

Create Vue Shared navigation component for cluster SPA

Currently, the Automate section has defined a way to automatically map the Vue Router configuration toe the breadcrumbs and the side bar active navigation. Part of this code live as a JS function that query the DOM for selectors and update the active items which is not ideal.

What we want to do is to create a new vue_shared component that encapsulate as much of the work as possible when creating a new SPA. This should:

  1. Take a Router object as a prop
  2. Take static breadcrumbs as a prop
  3. Use the injectBreadcrumbApp utils to mount on top of existing breadcrumb
  4. Create a breadcrumb structure with the router app and static routes
  5. Override the sidebar navigation by mounting a Vue app on top and creating links inside the app.
  6. Handle active navigation items