Visit Element on GitHub Check out the upload component
<el-upload
class="avatar-uploader"
action="/upload"
:show-file-list="false"
:on-error="handleUrlError"
:on-success="handleUrlSuccess">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
function:
handleUrlSuccess(response, file, fileList) {
}
if you add an extra parameter:
<el-upload
class="avatar-uploader"
action="/upload"
:show-file-list="false"
:on-error="handleUrlError"
:on-success="handleUrlSuccess(response, file, fileList, 233)">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
function:
handleUrlSuccess(response, file, fileList, param) {
}
Error message: Property or method "response" is not defined on the instance but referenced during render.