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