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;
        });
Logo

前往低代码交流专区

更多推荐