1.0.1 • Published 8 years ago
vue-inline v1.0.1
vue-inline
Inline anything in your Vue component, like string / component / images et al
Install
$ npm install --save vue-inline
Usage
Register the component globally:
import Inline from 'vue-inline'
Vue.use(Inline, {
data: {
// inline a string
foo: 'inlined foo',
// or an svg image with svg-inline-loader or file-loader
bar: require('/path/to/bar.svg')
}
})
Inline it in your component:
<template>
<!-- render a srring -->
<inline name="foo"></inline>
<!-- render an image -->
<inline name="bar"></inline>
</template>
Or register the inline component locally:
import {makeComponent} from 'vue-inline'
const Inline = makeComponent(data)
// register `Inline` in your component
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D