vue-modules
v0.3.0
Published
Some module implementation for VueJS
Downloads
6
Readme
Docs
Table of Contents
VueModules
VueModules
VueModules is a Vue plugin that tries to achieve some modularization of pages and components
install
Parameters
Vue
Vueoptions
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, 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' ]