• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
魏无羡的小古板
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 2 3 4 5 下一页
2021年7月16日
js节流和防抖函数
摘要: 节流:将多次执行换成每隔一会短时间执行一次 function throttle(fn,time){ let lastTime = null; return function(){ let nowTime = Date.now(); if(nowTime - lastTime > time || !l 阅读全文
posted @ 2021-07-16 15:33 魏无羡的小古板 阅读(50) 评论(0) 推荐(0)
2021年7月15日
webpack 打包时内存溢出问题
摘要: 方法一 步骤1、安装increase-memory-limit npm install -g increase-memory-limit 步骤2、项目跟目录中运行一下 increase-memory-limit 方法二 把devtool关闭,不添加sourcemap到内存 module.export 阅读全文
posted @ 2021-07-15 11:11 魏无羡的小古板 阅读(333) 评论(0) 推荐(0)
2021年7月13日
git push的时候报错 fatal: the remote end hung up unexpectedly
摘要: 是因为推送的文件太大了,修改提交缓存大小为500M,或者更大的数字 方法一 配置.git 修改 .git 文件夹下的config文件,添加一段话,内容如下 [http]postBuffer = 524288000 方法二 命令 git config --global http.postBuffer 阅读全文
posted @ 2021-07-13 14:37 魏无羡的小古板 阅读(289) 评论(0) 推荐(0)
2021年6月25日
Django+vue前后端分离 用axios post请求报错问题
摘要: 前端: axios.("/xxxxx/getToken/", {}).then((res) => { sessionStorage.setItem("csrftoken111",res.token) //向后台请求并获取csrftoken }); request.js 中添加 FEBS_REQUES 阅读全文
posted @ 2021-06-25 10:52 魏无羡的小古板 阅读(349) 评论(0) 推荐(0)
2021年6月3日
js 使用定时器setInterval ,页面显示会变得越来越慢
摘要: 一、如果用到jQuery的动画在animate前加上 $(obj).stop(true,true)$(obj).stop(true,true).animate() 二、通过浏览器窗口焦点事件,定时清掉定时器 window .onfocus=function(){ timer=setInterval( 阅读全文
posted @ 2021-06-03 13:27 魏无羡的小古板 阅读(1042) 评论(0) 推荐(0)
2021年5月28日
百度地图坐标转换(gps、google、百度坐标相互转换)
摘要: 参考文献:http://www.360doc.com/content/15/0905/17/9261962_497072422.shtml 阅读全文
posted @ 2021-05-28 15:20 魏无羡的小古板 阅读(340) 评论(0) 推荐(0)
js 防止连点
摘要: var canClick = true;$("#button").click(function(){ if(!canClick ){ return false } canClick = false; // 一、请求接口时获取返回值后才可以点击 $.post(url,data,(res) => { c 阅读全文
posted @ 2021-05-28 14:40 魏无羡的小古板 阅读(362) 评论(0) 推荐(0)
vue中全局去除字符串两端空格
摘要: main.js中 Vue.prototype.Trim = function(str) { return str.replace(/(^\s*)|(\s*$)/g, ""); } 使用 let str = " 123456789 " Trim(str) // "123456789" 阅读全文
posted @ 2021-05-28 09:08 魏无羡的小古板 阅读(1315) 评论(0) 推荐(0)
2021年5月14日
三种微信小程序获取用户头像昵称的方式
摘要: index.wxml <view class="container"> <view class="userinfo"> <block wx:if="{{canIUseOpenData}}" calss="userinfo-opendata"> <view class="userinfo-avatar 阅读全文
posted @ 2021-05-14 10:26 魏无羡的小古板 阅读(6319) 评论(0) 推荐(0)
2021年4月26日
微信小程序 wx.getUserProfile 替换 wx.getUserInfo
摘要: 获取用户信息。页面产生点击事件(例如 button 上 bindtap 的回调中)后才可调用,每次请求都会弹出授权窗口,用户同意后返回 userInfo。 将从4月开始用 wx.getUserProfile 替换 wx.getUserInfo 。用法如下: <view class="containe 阅读全文
posted @ 2021-04-26 15:49 魏无羡的小古板 阅读(1725) 评论(0) 推荐(0)
上一页 1 2 3 4 5 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3