1.1.1 • Published 5 years ago
alloycrop-vue v1.1.1
AlloyCrop-vue
AlloyCrop vue wrap demo
params
Param | Description |
---|---|
confirmText | confirmText |
cancelText | cancelText |
output | output |
width | width |
height | height |
circle | circle |
imgPath | imgPath |
res.data | crop canvas |
💡️ try exif-js get orientation
example
js
import AlloyCropVue from 'alloycrop-vue'
Vue.use(AlloyCropVue)
this.$crop({
imgPath: URL.createObjectURL(file)
}).then(res => {
if (res.type === 'confirm') {
// base64 res.data.toDataURL('image/png')
// blob res.data.toBlob(blob => {}, `image/png`)
}
})