vue.js 怎么遍历获取到的数组并添加属性
vue.js 怎么遍历获取到的数组并添加属性this.loading = true;this.$ajax.get("/newstore/api/serviceitems").then(result => {this.loading = false;result.data.forEach(el=>{...
·
vue.js 怎么遍历获取到的数组并添加属性
this.loading = true;
this.$ajax
.get("/newstore/api/serviceitems")
.then(result => {
this.loading = false;
result.data.forEach(el=>{
el.num = 1
})
this.options = result.data;
console.log(this.options,"opt")
})
.finally(result => {
this.loading = false;
});
更多推荐
已为社区贡献3条内容
所有评论(0)