四十、操作数组不改变原数组的值

getCurrentUserIds(){
				this.searchRequest("/trainingActivityAuditing/getCurrentUserIds").then(resp => {
					this.addForm.originatorName = resp.data.data;
					//部门id
					var val = [];
					debugger
					var arr = resp.data.data;
                        //slice会返回一个新数组,不会修改原数组 val = arr.slice(); val = val.splice(0,val.length-1) this.showId = val.join(","); }) },

  

posted @ 2019-04-29 10:20  杰_森  阅读(449)  评论(0编辑  收藏  举报