Upload (上传)

拖拽图片上传,内置裁剪。

基础用法

Drag & drop or click — crop to 1:1
Basic.vue

尺寸与比例

正方形 1:1
宽幅 16:9
SizeAspect.vue

圆角与默认图片

圆形头像
上传图片
Rounded.vue

属性

属性类型默认值说明
aspect *number
size *number
classNamestring""
descriptionstring""Helper text below the dropzone. Canonical name.
hintstring""Helper text below the field.
initialImagestring""
roundedKunUIRounded

事件

事件回调参数说明
setImageimg: BlobThe cropped image, once the user applies the crop.