可以通过将e.tempFiles赋值给item.attachmentList来将e的值赋给当前行的item.attachmentList。具体的实现方式如下:

  1. 将upload方法修改为接收一个参数item,表示当前行的数据:
upload(item) {
  // 将e.tempFiles赋值给item.attachmentList
  item.attachmentList = e.tempFiles;
},
  1. 在模板中调用upload方法时,将当前行的数据item作为参数传递进去:
<button type="default" size="mini" plain="true" @click="upload(item)">佐证资料:<br>(点击上传)</button>

这样就可以将e.tempFiles赋值给当前行的item.attachmentList了。

uni-segmented-control current=current values=items clickItem=onClickItem styleType=text				activeColor=#007affuni-segmented-control			view class=content				view v-show=current === 0					uni-group v-fo

原文地址: https://www.cveoy.top/t/topic/hAvF 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录