LearningRecord icon indicating copy to clipboard operation
LearningRecord copied to clipboard

vue 在 v-for 时给每项元素绑定事件需要用事件代理吗?为什么?

Open Rashomon511 opened this issue 5 years ago • 0 comments

在vue 中 vue 做了处理 如果我们自己在非vue 中需要对很多元素添加事件的时候,可以通过将事件添加到它们的父节点而将事件委托给父节点来触发处理函数

Rashomon511 avatar Jun 24 '19 01:06 Rashomon511