for let i = 0; i picListlength; i++ if picListi instanceof File formDatapicListpushpicListi else const f = isMain picListiisMain
这段代码循环遍历一个名为picList的数组。如果picList中的元素是一个File对象,则将其添加到formData的picList属性中。如果不是一个File对象,则将其视为一个图片对象,从中提取出isMain和pid属性,将其添加到formData的pic属性中。这段代码可能是用于上传图片的逻辑。
原文地址: https://www.cveoy.top/t/topic/cOOl 著作权归作者所有。请勿转载和采集!