设置 accept 限制上传文件类型只能为图片不起作用

Blade 未结 2 1662
zhangsh
zhangsh 2020-05-19 10:42
{
    label: "附件",
    prop: "attachments",
    type: "upload",
    accept: ['image/gif','image/jpeg','image/jpg','image/png','image/svg'],
    // accept: "image/gif,image/jpeg,image/jpg,image/png,image/svg",
    dataType: "array",
    listType: 'picture-card',
    span: 24,
    loadText: "上传中...",
    action: "/api/path/to/put-file",
    drag: false,
    propsHttp: {
        res: "data",
        url: "link",
        name: "name",
    },
},

image.png

2条回答
提交回复