- 当前 Bug 的表现(可附上截图)
- 预期表现
leibienane 和 leibie 值怎么不是当前的?
- 复现路径
- 提供一个最简复现 Demo
<view class=‘picker’>
<picker bindchange=“bindleibChange” value="{{tjIndex}}" data-leibieNane=’{{tonji[tjIndex].name}}’ data-leibie=’{{tonji[tjIndex].id}}’ range="{{tonji}}" range-key=“name” >
<view>{{tonji[tjIndex].name}}</view>
</picker>
</view>
data: {
leibie: ‘’,
leibieNane: ‘’,
tjIndex: 0,
tonji: [
{
‘id’: ‘iFensiliang’,
‘name’: ‘粉丝量’
},
{
‘id’: ‘iTuijianYishujiaLiang’,
‘name’: ‘推荐艺术家量’
},
{
‘id’: ‘iTuijianYonghuLiang’,
‘name’: ‘推荐用户量’
},
{
‘id’: ‘iFangwenLiang’,
‘name’: ‘访问量’
},
{
‘id’: ‘iDianzanLiang’,
‘name’: ‘点赞量’
},
{
‘id’: ‘iPinglunLiang’,
‘name’: ‘评论量’
},
{
‘id’: ‘iMojieChengjiaoLiang’,
‘name’: ‘成交量’
},
{
‘id’: ‘iDongtaifabuliang’,
‘name’: ‘动态发布量’
},
{
‘id’: ‘iWenxianZhanxianLiang’,
‘name’: ‘文章发布量’
},
{
‘id’: ‘iMeitiZhishu’,
‘name’: ‘媒体指数’
},
{
‘id’: ‘iRenqizhishu’,
‘name’: ‘人气指数’
},
{
‘id’: ‘iJiazhiZhishu’,
‘name’: ‘价值指数’
}
],
},
bindleibChange(e) {
console.log(e.detail.value)
console.log(e)
this.setData({
tjIndex: e.detail.value,
// leibie: e.currentTarget.dataset.leibie,
// leibieNane : e.currentTarget.dataset.leibieNane
})
},