var path = e.currentTarget.dataset.imagePath
console.log(path);会输出undefined
1)去掉data后面驼峰命名
imagePath -> imagepath
2)直接输出e来查看
console.log(e)
摘自https://www.cnblogs.com/xiaoli52qd/p/7857468.html
var path = e.currentTarget.dataset.imagePath
console.log(path);会输出undefined
1)去掉data后面驼峰命名
imagePath -> imagepath
2)直接输出e来查看
console.log(e)
摘自https://www.cnblogs.com/xiaoli52qd/p/7857468.html