The uni-app array gets the first element according to the condition (find)

directly on the code

let obj = this.list.find(data => {
						if(data.id === this.isIndex) {
							return data
						}
					})
					console.log(obj)

 If it is useful to you, pay attention to the blogger's applet, log in to give support, and any open source and useful source code will be uploaded to the applet in the future

 

Guess you like

Origin blog.csdn.net/qq_42543264/article/details/121998597