随笔分类 - 微信小程序
摘要:project.config.json 里的 checkSiteMap 设为 false 就ok了
阅读全文
摘要:使用 getCurrentPages(); 获取当前页面栈。 数组中第一个元素为首页,最后一个元素为当前页面 Page({ /** * 页面的初始数据 */ data: {}, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { var page
阅读全文
摘要:自定义slider组件样式 * 实际上是另外写了一个 view 与 slider组件重叠,再把 slider 透明。实现自定义它的样式 JS Page({ data: { min: 0, // 最小限制 max:5, // 最大限制 value:0, // 当前value }, // 拖动过程中触发
阅读全文
摘要:创建一个 MD5.js 文件,写入: /* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. * Version 2
阅读全文
摘要:checkbox .wx-checkbox-input { /* checkbox 选项框大小 */ } checkbox .wx-checkbox-input.wx-checkbox-input-checked { /* checkbox 选中后样式 */ } checkbox .wx-check
阅读全文
摘要: < > & '     特殊字符解码 在标签内加上 decode='true' <text decode='true' > aaa aaa </text>
阅读全文
摘要:微信小程序 - 二维码生成工具 下载:weapp-qrcode.js 文件 github: https://github.com/Pudon/weapp-qrcode-base64 在项目中引入 weapp-qrcode.js 文件 js const app = getApp(); const QR
阅读全文
摘要:实现向左滑动删除 wxml <scroll-view scroll-y enable-back-to-top style="height:{{ scrollHeight }}px" > <view> <block wx:for="{{ list }}" wx:for-item="item" wx:f
阅读全文
摘要:实现微信小程序进行WebSocket实时双向通讯 下载 weapp.socket.io.js 在项目中引入 weapp.socket.io.js 文件 在 utils 文件中建立 socket.js 文件 在 socket.js 文件中写入: const io = require("../lib/w
阅读全文
摘要:实现页面跳转,跳转到指定锚点位置 在 index.wxml 页面创建跳转按钮 <!-- index.wxml --> <view class="btn" bindtap="jump" data-detail="detail0" > 跳到 detail0 锚点位置 </view> <view clas
阅读全文
摘要:实现微信小程序实现渐入渐出动画效果 在 App.js 中写入全局方法 App({ //渐入,渐出实现 show : function(that,param,opacity){ var animation = wx.createAnimation({ //持续时间800ms duration: 800
阅读全文

浙公网安备 33010602011771号