84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
As shown in the picture, why are the output attributes different? ? ? ? ?
点我跳转 {{item.a}}
点我跳转
{{item.a}}
温故而知新,可以为师矣。 博客:www.ouyangke.com
moveDown(item,e) { item.moveYse = true console.log(item,e,'down') item.startX = e.clientX item.startY = e.clientY },
moveUp(item,e) { item.moveYse = false let l = e.clientY - item.startY if (l < 50) { console.log(l) item.startY = 0 item.startX = 0 item.top = 0 item.left = 0 }else { } console.log(item.moveYse,item,item.moveYse,'up') }
When you printconsole.log(item.moveYse,item,item.moveYse,'up'), it is actually false, but when you click on the item object in the console, Since the moveDown method is executed, item.mouseYse is changed back to true.
console.log(item.moveYse,item,item.moveYse,'up')
When you print
console.log(item.moveYse,item,item.moveYse,'up')
, it is actually false, but when you click on the item object in the console, Since the moveDown method is executed, item.mouseYse is changed back to true.