04 2021 档案
摘要:节流 throttle 与 去抖 debounce的区别主要在触发时机上: debounce(func, wait, options):创建并返回函数的防反跳版本,将延迟函数的执行(真正的执行)在函数最后一次调用时刻的wait毫秒之后,对于必须在一些输入(多是一些用户操作)停止之后再执行的行为有帮助
阅读全文
摘要:main.js: router.beforeEach((to, from, next) => { const loginPath = '/login' if (to.path !== loginPath && !localStorage.getItem('user')) { next(loginPa
阅读全文
摘要:1.安装 npm install animate.css@3.7.2 --save 2.引入 main.js中: import animated from 'animate.css' Vue.use(animated) 3.使用 vue文件中: <!-- 直接使用animated中的动画class名
阅读全文
摘要:1.全局安装server npm install -g server 2.全局安装 http-server npm install http-server -g 3.执行http-server命令 如果想更改端口号: 执行命令:http-server -a 0.0.0.0 -p 8000
阅读全文
摘要:1.需要引入echart.js以及chain.js <script type="text/javascript" src="js/echarts.min.js"></script><script type="text/javascript" src="js/china.js"></script> h
阅读全文
摘要:npm install echarts --save 如果安装失败可以通过淘宝镜像进行安装依赖包 cnpm install echarts --save 引入后提示import有问题,需要将echarts版本降到5以下的,改为4.9.0之后显示没有问题了 将echart封装成组件: chartLin
阅读全文
摘要:前端请求时header中设置 contentType : ‘application/json’。 wx.request({ url: 'http://localhost:8080/send/add2', method:'POST', header: { "Content-Type": "applic
阅读全文

浙公网安备 33010602011771号