小程序参数中data-xxx 后面的参数不能用驼峰
正常
wxml
<view class='content' data-gid='{{item.gId}}' bindtap='openChatView'>
js
openChatView: function (event) {
console.log(event.currentTarget.dataset.gid)
},
异常
wxml
<view class='content' data-gId='{{item.gId}}' bindtap='openChatView'>
js
openChatView: function (event) {
console.log(event.currentTarget.dataset.gId)
},