
微信小程序
selectDele
每一个人都有缺点,正视它
展开
-
微信小程序,响应式监听全局函数
在utils下新建一个文件event.js,把下面的代码复制到该文件下class Event {on(event, fn, ctx) {if (typeof fn != “function”) {console.error(‘fn must be a function’)return}this._stores = this._stores || {};(this._stores[event] = this._stores[event] || []).push({ cb: fn, ctx: c原创 2020-07-07 18:44:29 · 1642 阅读 · 0 评论 -
小程序跳转到指定节点,锚点效果,非scroll-view实现
goAnchorPoint: function(e) { //1、返回一个查询实例 const query = wx.createSelectorQuery(); //2、选择要跳转的节点id query.select('#priceInfo').boundingClientRect(); //3、获取显示区域的尺寸、滚动等位置等信息,然后添加节点的滚动位置查询 query.selectViewport().scrollOffset(); //4、执行跳转 qu原创 2020-06-29 20:50:25 · 772 阅读 · 0 评论 -
关于小程序中使用three.js,预览无法显示贴图图片问题,图片的像素必须为2^n,且最大像素为1024*2048,且宽高比为1:1或者1:2。
图片的像素必须为2^n,且最大像素为1024*2048,且宽高比为1:1或者1:2。原创 2020-06-17 20:48:52 · 738 阅读 · 0 评论 -
微信小程序:页面获取自定义组件中的值
1、在component下新建一个test2、在test.wxml中写3、在test.js中写4、在/pages/index/index.json中加入5、在index.wxml中写6、在index.js中写7、运行原创 2019-08-19 17:39:49 · 7745 阅读 · 2 评论 -
小程序日历表
页面<view class='body'> <view class='time'> <image class='img rotate' src='http://wechat.espot.com.cn/gais/webResource1/staticResource/new/xiangyoujiantou.png?pfdrid_c=true' mode...原创 2019-08-30 13:52:34 · 1425 阅读 · 1 评论