props: {
uploadImg: Function, // call back to handle image changed(click then select a new image)
width: Number,
height: Number,
img: String, // image to show, you can reset it after the 'uploadImg' handler finished.
tips: Array, // tips show to the user.
disabled: Boolean, // disable click event
}
props: {
title: String, // Editor title, default: Upload Image
previewHint: String, // hint of preview, default: Preview
selectImgHint: String, // hint of select image, default: Select Image
cropHint: String, // hint of crop, default: Best size 'width'x'height', you can cut it.
onAvatarData: Function, // call back to process the image content.
width: Number, // width of cut window, default: 100 (px)
height: Number, // height of cut window, default: 100 (px)
radiusPerc: Number // radius percent, default: 100 (%)
}
slot
controller // replace default 'Select Image' button, for example, you can use an AvataViewer inside the Avatar
head // replace the "default header" in opened modal dialog.
Example
git clone git@github.com:iota-cn/vue-iota-avatar.git
cd vue-iota-avatar
npm i
npm run examples