小程序
Alex81320
这个作者很懒,什么都没留下…
展开
-
微信小程序 动态绑定 style 样式 和class
<view class="changeImageView" style="display:{{displayPhoto}}" ><view class="operbtn">测试</view></view><view class="section section_gap">&a原创 2018-10-31 19:31:54 · 62610 阅读 · 0 评论 -
滑动事件 左滑 右滑
// 滑动开始事件handletouchtart(e) {this.data.lastX = e.touches[0].pageX;this.data.lastY = e.touches[0].pageY;},handletouchend(event) {const touchMoveX = event.changedTouches[0].pageX;const tou...转载 2018-11-29 14:56:24 · 1504 阅读 · 0 评论 -
小程序 tabBar右上角 加标志 加数字提醒
显示数字或文字wx.setTabBarBadge({ index: 4, text: ‘new’, //可改 });移除文字wx.removeTabBarBadge({ index: 4,});//加红点wx.showTabBarRedDot({index: 4,});移除红点wx.hideTabBarRedDot({index: 4,...原创 2019-01-09 10:57:11 · 6508 阅读 · 2 评论 -
小程序 复制功能
wx.setClipboardData({ data: '010', //必须是字符串 不是要转.toString() success(response) { wx.showToast({ title: '复制成功', icon: 'none', }); }, });...原创 2019-01-25 16:39:02 · 786 阅读 · 0 评论 -
小程序 上传图片 相册 拍照
wx.chooseImage({ count: 1, // 张数, 默认9 sizeType: ['compressed'], // 建议压缩图 sourceType: ['album'], // 来源是相册 camera:拍照 success: (res) => { if (res.tempFiles[0] &&a...原创 2019-01-25 16:45:35 · 732 阅读 · 0 评论