10 2019 档案

原生小程序 wxs使用
摘要:github地址:https://developers.weixin.qq.com/miniprogram/dev/framework/view/wxs/ js: 阅读全文

posted @ 2019-10-31 17:16 旺仔小裤头 阅读(247) 评论(0) 推荐(0)

正则踩坑一
摘要:$1,$2.....:显示括号里的第一个;显示括号里的第二个.... let content='<img src="http://qiniu.ve-link.com/files/3/3/45/b20e446593872e59a99aff02edca5c9a450e4533.jpg" style="h 阅读全文

posted @ 2019-10-31 17:12 旺仔小裤头 阅读(124) 评论(0) 推荐(0)

小程序 富文本编辑器解析标签组件
摘要:方法一:rich-text 文档:https://developers.weixin.qq.com/miniprogram/dev/component/rich-text.html 方法二(当需要触发点击事件时可以使用): 使用wxParse:https://github.com/icindy/wx 阅读全文

posted @ 2019-10-18 17:11 旺仔小裤头 阅读(615) 评论(0) 推荐(0)

原生小程序 常用api集合
摘要:1.手机选择照片 var that = this; wx.chooseImage({ count: 9, // 默认9 sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 sourceType: ['album', 'camera 阅读全文

posted @ 2019-10-15 14:53 旺仔小裤头 阅读(390) 评论(0) 推荐(0)

原生小程序 拖拽组件movable-view
摘要:例子: 1.wxml: <movable-area class='movable-box'> <movable-view class='movable-btn' x='{{x}}' y='{{y}}' direction='all' bindtouchstart='homeMoveStart' bi 阅读全文

posted @ 2019-10-15 14:33 旺仔小裤头 阅读(954) 评论(0) 推荐(0)

原生小程序 自定义封装组件
摘要:1.在components自定义文件夹,文件夹里分别包含wxml,wxss,js,json文件 (componetns文件是自己手写的) 2.wxml与wxss文件按照平常的来就好 3.js文件 Component({ properties:{ 页面上需要动态传递的参数:数据类型 例如:name:S 阅读全文

posted @ 2019-10-14 10:00 旺仔小裤头 阅读(722) 评论(0) 推荐(0)

H5 es6 foreach使用
摘要:数组.foreach(数组中的每一项,下标)=>{} 例如: let arr=[ {id:1,name:'张三'}, {id:2,name:'李四'}, {id:3,name:'王五'} ] arr.foreach(item,index)=>{ console.log(item.id) //1,2, 阅读全文

posted @ 2019-10-14 09:18 旺仔小裤头 阅读(905) 评论(0) 推荐(0)

原生小程序底部弹出层动画过渡
摘要:1.wxml <view class="my-dialog" catchtouchmove="true">//catchtouchmove阻止冒泡,防止遮罩层底部滑动 <view class="my-mask" bindtap="confirmDialog" hidden="{{!showDialo 阅读全文

posted @ 2019-10-12 10:27 旺仔小裤头 阅读(826) 评论(0) 推荐(0)