|
@@ -119,12 +119,16 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
newimgarr(localIds) {
|
|
newimgarr(localIds) {
|
|
|
|
|
+ // 防御性处理,确保 this.imgArr 一定为数组
|
|
|
|
|
+ if (!Array.isArray(this.imgArr)) {
|
|
|
|
|
+ this.imgArr = [];
|
|
|
|
|
+ }
|
|
|
if (this.isIOS()) {
|
|
if (this.isIOS()) {
|
|
|
- this.imgArr = this.imgArr.concat(localIds);
|
|
|
|
|
|
|
+ this.imgArr = this.imgArr.concat([...localIds]);
|
|
|
// 解决ios微信localId无法直接使用的问题,获取base64后再上传
|
|
// 解决ios微信localId无法直接使用的问题,获取base64后再上传
|
|
|
// this.setIosImg(localIds);
|
|
// this.setIosImg(localIds);
|
|
|
} else {
|
|
} else {
|
|
|
- this.imgArr = this.imgArr.concat(localIds);
|
|
|
|
|
|
|
+ this.imgArr = this.imgArr.concat([...localIds]);
|
|
|
}
|
|
}
|
|
|
// this.$emit('upDataDetail');
|
|
// this.$emit('upDataDetail');
|
|
|
},
|
|
},
|