0.3.0 • Published 8 years ago
vue-modules v0.3.0
Docs
Table of Contents
VueModules
VueModules
VueModules is a Vue plugin that tries to achieve some modularization of pages and components
install
Parameters
VueVueoptionsobject Customizations of the plugin
Examples
Vue.use(VueModules, options)registerModule
Parameters
optionsobject Customizations for module
Examples
Vue.registerModule({ resource, module })routeHandler
Route Handler
Handles a route
Parameters
_route$1Object$1.resource$1.routes(optional, default[])$1.alias(optional, defaultfalse)$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' ]