- 博客(5)
- 收藏
- 关注
原创 微信小程序 监听页面滚动和结束滚动
先了解 js的节流和防抖函数 /*函数节流*/ function throttle(fn, interval) { var enterTime = 0;//触发的时间 var gapTime = interval || 300;//间隔时间,如果interval不传,则默认300ms return function () { var context = this; var backTime = new Date();//第一次函数return即触发的时
2021-10-12 15:37:47
1573
原创 vue-router go(-1)后退时怎么带参数?
解决方案 声明一个空的Vue模块eventBus import Vue from 'vue' /** * 定义空的vue实例,作为 eventbus实现非父子组件之间的通信(vue2.x中去掉了broadcast) */ var eventBus = new Vue({}); export default eventBus; 通过eventBus.$emit传参给上一个页面 import eventBus from '../service/eventbus.js'; methods:{
2021-07-21 11:35:28
3059
原创 微信小程序自定义顶部栏
首先自定义导航栏。。。步骤省略。。。 <view class="top-bar" style="margin-top:{{navTop}}rpx;height:{{navHeight}}px"> <text>首页</text> </view> 注意navTop是rpx wx.getSystemInfo({ success(res) { let menuButtonObject = wx.getM
2021-06-24 16:49:40
123
转载 Vue 学习之 Electron-vue 使用 serialport 连接本地串口
Vue 学习之 Electron-vue 使用 serialport 连接本地串口 1. 安装 vue create projectName //安装electron 及vue 支持组件 vue add electron-builder 2. 添加原生模块(如serialport) 过程省略。。。 最终的配置 background(.js/.ts) app.allowRendererProcessReuse = false; vue.config(.js/.ts) module.exports =
2021-06-22 11:50:24
1282
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人