H5 段,无法获取 e.currentTarget.dataset.
template 绑定 <text :data-productInfo="product"....
methods 调用 add function(e) { console.log(e); .........
在Chrome 控制台中 报错 ReferenceError: e is not defined
微信开发者工具,运行正常。
这是什么原因??? 如何解决。
{
"mp": {
"type": "click",
"timeStamp": 418480.12500000186,
"detail": {
"x": 300,
"y": 223
},
"target": {
"id": "",
"offsetLeft": 142,
"offsetTop": 0,
"dataset": {
"productinfo": "[object Object]"
},
"x": 300,
"y": 223
},
"currentTarget": {
"id": "",
"offsetLeft": 142,
"offsetTop": 0,
"dataset": {
"productinfo": "[object Object]"
}
},
"touches": [
{
"identifier": 0,
"pageX": 344,
"pageY": 223,
"clientX": 344,
"clientY": 223,
"force": 1
}
],
"changedTouches": [
{
"identifier": 0,
"pageX": 344,
"pageY": 223,
"clientX": 344,
"clientY": 223,
"force": 1
}
]
},
"_processed": true,
"type": "click",
"timeStamp": 418480.12500000186,
"detail": {
"x": 300,
"y": 223
},
"target": {
"id": "",
"offsetLeft": 142,
"offsetTop": 0,
"dataset": {
"productinfo": "[object Object]"
},
"x": 300,
"y": 223
},
"currentTarget": {
"id": "",
"offsetLeft": 142,
"offsetTop": 0,
"dataset": {
"productinfo": "[object Object]"
}
},
"touches": [
{
"identifier": 0,
"pageX": 344,
"pageY": 223,
"clientX": 344,
"clientY": 223,
"force": 1
}
],
"changedTouches": [
{
"identifier": 0,
"pageX": 344,
"pageY": 223,
"clientX": 344,
"clientY": 223,
"force": 1
}
]
}
米斯特郭 (作者)
谢谢答复,请问如何在 uniapp 中 用vue的方法里传入参数?
2019-04-07 15:32
DCloud_heavensoft
https://segmentfault.com/a/1190000015684864
2019-04-07 15:47