批量操作取值调接口

批量操作取值调接口

selectionChange(val) {
				var arr = [];//数组置空
				if(val.length) {/////////////切记,判断取值数组的的长度
					for(var i = 0; i < val.length; i++) {
						arr.push(val[i].id)//追加你需要的id
						this.selectedId = arr
					}
					this.selectShow = true
				} else {
					this.selectedId = []//切记没值的时候还要置空数组
					this.selectShow = false
				}
				this.$emit('selectionChange', this.selectedId)//子组件更新父组件,并把值带过去
			},
原文地址:https://www.cnblogs.com/lml-lml/p/9089690.html