摘要: wx.setNavigationBarTitle() 动态设置页面标题 wx.setNavicationBarColor() 动态设置页面标题的颜色和背景等 样式: 示例代码: wx.setNavigationBarTitle({ title: '当前页面' }) wx.setNavigationB 阅读全文
posted @ 2020-01-09 15:33 GetcharZp 阅读(5617) 评论(0) 推荐(0)
摘要: wx.showActionSheet() 选择菜单 样式截图: 示例代码: wx.showActionSheet({ itemList: ['A', 'B', 'C'], success (res) { console.log(res.tapIndex) }, fail (res) { consol 阅读全文
posted @ 2020-01-09 15:27 GetcharZp 阅读(2198) 评论(0) 推荐(0)
摘要: wx.showLoading() 显示加载框,需要主动加 wx.hideLoading() 才能隐藏 样式: 示例代码: wx.showLoading({ title: '加载中', }) setTimeout(function () { wx.hideLoading() }, 2000) 阅读全文
posted @ 2020-01-09 15:24 GetcharZp 阅读(6702) 评论(0) 推荐(0)
摘要: wx.shoModal() 模态弹窗 样式: 示例代码: wx.showModal({ title: '提示', content: '这是一个模态弹窗', success (res) { if (res.confirm) { console.log('用户点击确定') } else if (res. 阅读全文
posted @ 2020-01-09 15:20 GetcharZp 阅读(303) 评论(0) 推荐(0)
摘要: wx.showToast()样式: 示例代码: wx.showToast({ title: '成功', icon: 'success', duration: 2000 }) 阅读全文
posted @ 2020-01-09 15:16 GetcharZp 阅读(714) 评论(0) 推荐(0)
摘要: getLauchOprionsSync() 作用:获取小程序启动时的参数 使用位置:JS文件的任意位置 实例代码: console.log(wx.getLaunchOptionsSync()); 阅读全文
posted @ 2020-01-09 14:56 GetcharZp 阅读(241) 评论(0) 推荐(0)