How to use vue-router-layout - 1 common examples

To help you get started, we’ve selected a few vue-router-layout examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ktsn / vue-cli-plugin-auto-routing / generator / template / src / router.js View on Github external
import Vue from 'vue'
import Router from 'vue-router'
import routes from 'vue-auto-routing'
import { createRouterLayout } from 'vue-router-layout'

Vue.use(Router)

const RouterLayout = createRouterLayout(layout => {
  return import('@/layouts/' + layout + '.vue')
})

export default new Router({
  routes: [
    {
      path: '/',
      component: RouterLayout,
      children: routes
    }
  ]
})

vue-router-layout

Lightweight layout selector for Vue Router

MIT
Latest version published 2 years ago

Package Health Score

48 / 100
Full package analysis

Popular vue-router-layout functions