0.3.0 • Published 6 years ago

vue-modules v0.3.0

Weekly downloads
15
License
MIT
Repository
github
Last release
6 years ago

Docs

Table of Contents

VueModules

VueModules

VueModules is a Vue plugin that tries to achieve some modularization of pages and components

install

Parameters

  • Vue Vue
  • options object Customizations of the plugin

Examples

Vue.use(VueModules, options)

registerModule

Parameters

  • options object Customizations for module

Examples

Vue.registerModule({ resource, module })

routeHandler

Route Handler

Handles a route

Parameters

  • _route
  • $1 Object
    • $1.resource
    • $1.routes (optional, default [])
    • $1.alias (optional, default false)
    • $1.custom.routes (optional, default [])

_route

Override a page/route

In the example the route named as "user" will load the "MyCustomUserPage" instead of the defined in the module

Examples

customRoutes = [
  { name: 'user', component: require('./MyCustomUserPage') }
]

alias

Adds a alias for a route

In the example the route "/usuario" is a duplication of the route "/user"

Examples

route.alias = [ '/user=/usuario' ]
0.3.0

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago