Vue filters the empty data of the array object (filter() filter array method)

If an attribute value of the array object is empty, filter out this object and pass it to the background

let queryList = this.queryList.filter((item) => {
    
    
	return item.name !== ''
})

console.log('kk', queryList)

Insert picture description here

If the parameter name is empty, filter this piece of data

Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_43908123/article/details/108330405