Solve the problem that the upload component of Element-UI cannot bind corresponding elements when it is used in multiple ways. In previous projects, the upload of pictures is single or several pictures (mainly element based on VUE), and the picture path is fixed. Therefore, we have encountered the problem of uploading multiple pictures in the list, so let’s take a look at the common forms
All elements in an Element can be used normally, but not when a list is being uploaded
First of all, the data in the list is dynamically obtained, so to change an image, we need to get the index value of the image index, In the el-upload component :on-success=”handleAdPicSuccess” and :on-change=”handleAdPicChange”, there is no way to pass parameters, so we have to add the required parameters before executing these methods. The method is as follows: