上一页 1 2 3 4 5 6 7 8 9 10 ··· 33 下一页
  2021年1月22日
摘要: 1. router-link 1. 不带参数 <router-link :to="{name:'home'}"> <router-link :to="{path:'/home'}"> //name,path都行, 建议用name // 注意:router-link中链接如果是'/'开始就是从根路由开 阅读全文
posted @ 2021-01-22 13:46 刘世涛6192 阅读(3102) 评论(0) 推荐(0)
  2021年1月21日
摘要: replaceReg: function(str) { let regx = /(https|http|ftp|file):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/g; let chineseReg = /[\u4e00-\u9 阅读全文
posted @ 2021-01-21 10:43 刘世涛6192 阅读(1005) 评论(0) 推荐(0)
  2021年1月18日
摘要: *定义滚动条宽高及背景,宽高分别对应横竖滚动条的尺寸*/ ::-webkit-scrollbar { width: 16px; height: 16px; background-color: #f5f5f5; } /*定义滚动条的轨道,内阴影及圆角*/ ::-webkit-scrollbar-tra 阅读全文
posted @ 2021-01-18 10:01 刘世涛6192 阅读(156) 评论(0) 推荐(0)
  2021年1月15日
摘要: 具体代码如下: function filechange(e) { var file = $('#filed').get(0).files[0]; var fileSize = file.size, fileType = file.type; if (file.name.lastIndexOf('.' 阅读全文
posted @ 2021-01-15 16:53 刘世涛6192 阅读(3218) 评论(0) 推荐(0)
摘要: EventBus的简介 EventBus 又称为事件总线。在Vue中可以使用 EventBus 来作为沟通桥梁的概念,就像是所有组件共用相同的事件中心,可以向该中心注册发送事件或接收事件,所以组件都可以上下平行地通知其他组件,但也就是太方便所以若使用不慎,就会造成难以维护的灾难,因此才需要更完善的V 阅读全文
posted @ 2021-01-15 14:14 刘世涛6192 阅读(985) 评论(0) 推荐(0)
  2021年1月7日
摘要: 备注: wx.navigateTo进行跳转会往路由列表追加; 如果不使用 wx.navigateTo进行跳转 this.getOpenerEventChannel()返回的是一个空对象 想使用 eventChannel.emit(this.opt.event, {data: ''});直接报错; 阅读全文
posted @ 2021-01-07 11:50 刘世涛6192 阅读(2970) 评论(0) 推荐(0)
摘要: 备注:小程序弹出层组件开发() index.js // common/pop/pop.js Component({ options: { multipleSlots: true // 在组件定义时的选项中启用多slot支持 }, /** * 组件的属性列表 */ properties: { auto 阅读全文
posted @ 2021-01-07 11:46 刘世涛6192 阅读(211) 评论(0) 推荐(0)
摘要: 备注:小程序组件 js文件不要写 page()等,开发过程没有问题上传在真机上会报错 一下以自定义导航头部为实例: header.js文件: // pages/components/header/header.js // // 启用插槽 Component({ options: { multiple 阅读全文
posted @ 2021-01-07 11:39 刘世涛6192 阅读(149) 评论(0) 推荐(0)
  2020年12月26日
摘要: 第一步 在app.js中 onLaunch: function (option){ this.overShare(); } 第二步:重写分享方法 overShare: function () { let _this = this //间接实现全局设置分享内容 wx.onAppRoute(functi 阅读全文
posted @ 2020-12-26 16:26 刘世涛6192 阅读(3954) 评论(0) 推荐(0)
  2020年12月23日
摘要: 小程序中A页面代码JS代码 Page({ toPtol(e){ const id=e.currentTarget.dataset['id']; const loadId=e.currentTarget.dataset['loadid']; console.log(loadId) wx.navigat 阅读全文
posted @ 2020-12-23 14:00 刘世涛6192 阅读(600) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 33 下一页