会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小灬壊
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
2020年9月22日
获取页面路径中的参数
摘要: getvalue:function(name) { var str = window.location.search; if(str.indexOf(name) != -1) { var pos_start = str.indexOf(name) + name.length + 1; var pos
阅读全文
posted @ 2020-09-22 14:45 小灬壊
阅读(260)
评论(0)
推荐(0)
2020年9月1日
微信小程序引用组件的方式
摘要: 1.component引入 先创建 再需要的页面在对应的json中引入 { "navigationBarTitleText": "结算", "usingComponents": { "goods-form":"/components/order/order-submit/goods-form/goo
阅读全文
posted @ 2020-09-01 16:04 小灬壊
阅读(4199)
评论(0)
推荐(0)
2020年8月30日
this指向知识梳理
摘要: function的this在不同环境下调用的指向 1.事件调用环境 谁调用事件,this就指向谁 <body> <div class="boxs"></div> </body> </html> <script> let b = document.querySelector(".boxs") func
阅读全文
posted @ 2020-08-30 01:11 小灬壊
阅读(200)
评论(0)
推荐(0)
2020年8月27日
for循环整理
摘要: for循环整理 普通for循环 var arr = [1, 2, 3]; for(let i = 0; i < arr.length; i++) { console.log(arr[i],i); // 1,0 // 2,1 // 3,2 } forEach循环 forEach不能正确响应 break
阅读全文
posted @ 2020-08-27 17:22 小灬壊
阅读(137)
评论(0)
推荐(1)
微信小程序使用wxs(小程序的一套脚本语言)
摘要: 微信小程序使用wxs(小程序的一套脚本语言) 1.WXS 不依赖于运行时的基础库版本,可以在所有版本的小程序中运行。 2.WXS 与 JavaScript 是不同的语言,有自己的语法,并不和 JavaScript 一致。 3.WXS 的运行环境和其他 JavaScript 代码是隔离的,WXS 中不
阅读全文
posted @ 2020-08-27 15:40 小灬壊
阅读(903)
评论(0)
推荐(0)
2020年8月26日
正则表达式常用的匹配规则
摘要: 常用的一些正则表达式 手机号码正则表达式验证 var phone = "17754585895" console.log(/^1[34578]\d{9}$/.test(phone)) //true console.log(/^1(3|4|5|7|8)\d{9}$/.test(phone)) //tr
阅读全文
posted @ 2020-08-26 18:19 小灬壊
阅读(305)
评论(0)
推荐(1)
2020年8月25日
textarea层级过高的解决办法
摘要: 方法一:微信开发者文档中使用了<cover-view>元素遮住textarea 方法二:封装一个textarea(原理通过view标签来代替不点击输入时的状态) wxml <view class="wrap wrap-class"> <view class="placeholder placehol
阅读全文
posted @ 2020-08-25 16:11 小灬壊
阅读(668)
评论(0)
推荐(0)
防止用户连续点击按钮导致页面数据重复
摘要: data: { level: 1, page: 1, list: [], status:true }, myTab: function(e) { if(!this.data.status){ return } var a = this, i = t.pdata(e).level; a.setData
阅读全文
posted @ 2020-08-25 15:39 小灬壊
阅读(352)
评论(0)
推荐(0)
2020年8月24日
微信小程序tab切换
摘要: 1.html布局 <view class='title'> <view class="{{0 == currentIndex ? 'title-sel-selected' : 'title-sel'}}" bindtap='titleClick' data-idx='0'> <text>直播</te
阅读全文
posted @ 2020-08-24 17:36 小灬壊
阅读(129)
评论(0)
推荐(0)
上一页
1
2
3
4
公告