返回

如何获取showActionSheet中的值 - 微信小程序

发布时间:2022-11-08 12:21:34 246
# webkit# 小程序# 数据

 

<view class="container">
<button type="primary" bindtap="click">按钮</button>

<view>{{value}} </view>
</view>
Page({

/**
* 页面的初始数据
*/
data: {
value: ""
},

click: function() {
var ithis = this;
var list = ['A', 'B', 'C'];
console.log(ithis)
wx.showActionSheet({
itemList: list,
success(res) {
console.log(res.tapIndex)
console.log(res)
console.log(list)
ithis.setData({
value: list[res.tapIndex]
})
},
fail(res) {
console.log(res.errMsg)
}
})
}
})

如何获取showActionSheet中的值 - 微信小程序_数据

 

如何获取showActionSheet中的值 - 微信小程序_wx_02

 

如何获取showActionSheet中的值 - 微信小程序_wx_03

 

特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报
评论区(0)
按点赞数排序
用户头像
精选文章
thumb 中国研究员首次曝光美国国安局顶级后门—“方程式组织”
thumb 俄乌线上战争,网络攻击弥漫着数字硝烟
thumb 从网络安全角度了解俄罗斯入侵乌克兰的相关事件时间线
下一篇
接口Iterator 2022-11-08 11:47:49