element-ui upload组件 on-remove事件 传自定义参数


< 声明:非原创文章,仅记录,转载自CSDN博主「tyjlearning」的原创文章,遵循CC 4.0 BY-SA版权协议
< 原文链接:https://blog.csdn.net/tyjlearning/article/details/105642223

html部分

<el-form-item label="附件上传" prop="" >
    <!--:file-list="item.fileList"-->
    <el-upload
        class=""
        action="#"
        list-type="picture-card"
        :on-preview="handlePictureCardPreview"
        :before-upload="beforeLogoUpload"
        :http-request="uploadFile"
        :on-remove="(file, fileList) => {handleRemove(file, fileList, index)}"
    >
        <el-button size="small" type="primary" style="margin-left:-35px;" @click="markIndex(index)">点击上传</el-button>
    </el-upload>

script部分

handleRemove(file, fileList,fileIndex){}

备注:element-ui的upload其它回调方法,也可以使用这个来实现自定义参数


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM