An open API service indexing awesome lists of open source software.

https://github.com/yariksav/vue-alias

Vue component render aliases
https://github.com/yariksav/vue-alias

Last synced: 4 months ago
JSON representation

Vue component render aliases

Awesome Lists containing this project

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

```js
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

```js
import { wrapHandler } from 'vue-alias'

...
render (h) {
h = wrapHandler(h)
return h('select', {props: {}}, children)
}
```

or

```js
import { alias } from 'vue-alias'

...
const cmp = alias(component)
}
```