JImageUpload 图片上传 ✔
JImageUpload 组件可以图片。
组件参数
参数 | 类型 | 必填 | 默认值 | 说明 |
---|---|---|---|---|
value(v-model) | string / array | '' | ||
text | string | '上传' | 按钮显示文字 | |
listType | string | 'picture-card' | 上传列表的内建样式,支持三种基本样式picture 和picture-card | |
bizPath | string | 'temp' | 用于控制文件上传的业务路径 | |
disabled | bool | false | 是否禁用 | |
fileMax | number | 1 | 最大上传数量 |
效果展示
使用示例
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,
}
}
]