[Vue warn]: Error in render: "TypeError: this.formData.subImages.split is not a function"
问题:
错误代码:
computed:{ //附图轮播图 subImgList(){ let imgArray = this.formData.subImages.split(','); imgArray.map(n => { this.subImg.push({ name:'sub-img', url:n }) }) return this.subImg; }, },
解决办法:
let imgArray = (this.formData.subImages || "").split(',');参考文章:点击打开链接