1.0.8 • Published 7 years ago
vue-painting v1.0.8
vue-painting
A Vue.js(v2.x+) component for cropping and painting image.
see:demo
Installation
NPM
npm install vue-painting --saveES6:
import VuePainting from 'vue-painting'
new Vue({
components: {
VuePainting
}
})CommonJS:
const VuePainting = require('vue-painting')
new Vue({
components: {
VuePainting
}
})Browser
<body>
<script src="path/to/vue.js"></script>
<script src="path/to/vue-painting.js"></script>
<script>
new Vue({
components: {
'vue-painting': VuePainting
}
})
</script>
</body>Usage
Props
| Prop | Type | Descrition |
|---|---|---|
| img | String | The image source,can be base64 and url |
Events
| Name | ParamType | Descrition |
|---|---|---|
| saveImage | clipImageBlob | dispatch when save button click |
| copyImage | clipImageBlob | dispatch when √ click |
| quit | dispatch when quit |