跳到主要内容

JImageUpload 图片上传 ✔

JImageUpload 组件可以图片。

组件参数

参数类型必填默认值说明
value(v-model)string / array''
textstring'上传'按钮显示文字
listTypestring'picture-card'上传列表的内建样式,支持三种基本样式picturepicture-card
bizPathstring'temp'用于控制文件上传的业务路径
disabledboolfalse是否禁用
fileMaxnumber1最大上传数量

效果展示

使用示例

const schemas: FormSchema[] = [
{
field: 'images',
component: 'JImageUpload',
label: '上传图片(1)',
helpMessage: '最多上传1张图片',
componentProps: {
fileMax : 1,
},
},
{
field: 'images2',
component: 'JImageUpload',
label: '上传图片(picture)',
helpMessage: '最多上传3张图片',
componentProps: {
listType : 'picture',
fileMax : 3,
}
}
]