//html<picker id="index1" class="picker-wrap" bindchange='pickerwrap' range="{{array}}" value="{{index}}"> <view class="picker player-name">{{array[index1]}}</view></picker><picker id="index1" class="picker-wrap" bindchange='pickerwrap' range="{{array}}" value="{{index}}"> <view class="picker player-name">{{array[index2]}}</view></picker>。。。。//js部分data: {array: ['xiaohu', 'Letme', 'Ming', 'UZI', '纯色的血', 'Untara', 'Blank', 'Faker', 'Bang', 'Wolf'],array2: ['青钢影', '虚空掠夺者', '发条魔灵', '暗夜猎手', '魂锁典狱长', '暮光之眼', '盲僧', '正义巨像', '麦林炮手', '风暴之怒'],index: 0,},//下面为调用的函数pickerwrap: function (e) {console.log('picker发送选择改变,携带值为', e),this.setData({index: e.detail.value,})},比如一共有10个选择框,我如何区分是哪个index,并且只改变它的index值,从而改变内容里面的值
添加回答
举报
0/150
提交
取消