[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})...
·
问题:
错误代码:
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(',');参考文章: 点击打开链接
更多推荐
已为社区贡献15条内容
所有评论(0)