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

Blade 未结 2 1661
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条回答
  • 这个需要给avue发一个issue

    0 讨论(1)
  • 2020-05-19 11:06

    issue:https://github.com/nmxiaowei/avue/issues/245

    0 讨论(0)
提交回复