vue-alias
v0.1.0
Published
This package will help use alias in render function In future it wiil help you change components or frameworks
Readme
VUE alias helper
This package will help use alias in render function In future it wiil help you change components or frameworks
NOTE: Module is in initial development. Anything may change at any time.
example
import { register } from 'vue-alias'
// register aliases
register({
text: {
component: 'VTextField',
replaces: {
error: 'errorMessages'
}
},
textarea: {
component: 'v-textarea',
replaces: {
error: 'errorMessages'
}
},
select: {
component: 'v-select',
replaces: {
error: 'errorMessages'
}
},
...
})Then you can use in vue component render function
import { wrapHandler } from 'vue-alias'
...
render (h) {
h = wrapHandler(h)
return h('select', {props: {}}, children)
}or
import { alias } from 'vue-alias'
...
const cmp = alias(component)
}