<u-form-item prop="fileUpload" label-position="top" > <js-uploadfile @on-success="uploadSuccess" v-model="this.fileUpload" :biz-key="item.id" biz-type="fileUpload_image" ></js-uploadfile> </u-form-item> 帮我设计一段代码实现 当this.fileUpload中的值发生变化时,将该值push到fileUpload1当中
时间: 2023-07-19 22:41:06 浏览: 177
使用FileUpload组件实现上传功能
好的,你可以在组件的watch选项中监听this.fileUpload的变化,并在回调函数中使用Array的push方法将其添加到fileUpload1数组中。代码示例如下:
```
watch: {
fileUpload(newVal, oldVal) {
this.fileUpload1.push(newVal)
}
}
```
阅读全文