<div class="company_info" v-for="(item, index) in corpList" :key="index">
<van-uploader class="uploader_wrapper"
:after-read="afterRead(index)">
<div class="uploader uploader2">
<van-image
width="130px"
:max-count="1"
:src="item.FasttdfsId"
/>
</div>
</van-uploader>
</div>
data() {
return {
corpList: [{ ...corpList }],
};
},
methods: {
// 上传的第几站则设置数组中第几个的值,方便后面回显
afterRead(index) {
//afterRead自带的参数file写在return里面
return (file) => {
this.corpList[index].FastdfsId = file.content;
};
},
}