摘要: js节流阀 'use strict'; (function(angular) { angular.module('throttleModule', []) .service('throttleService', ['$timeout', function($timeout) { /** * 描述 * 阅读全文
posted @ 2021-09-26 19:02 小猪章鱼 阅读(104) 评论(0) 推荐(0) 编辑
摘要: http://react-china.org/t/topic/33535 阅读全文
posted @ 2020-09-01 18:15 小猪章鱼 阅读(216) 评论(0) 推荐(1) 编辑
摘要: 背景:项目入口执行了 registerServiceWorker()。目的是为了实现 app 的离线缓存。 service worker 是独立于主线程的 js 线程。 可用于:(1)推送消息、(2)后台同步、(3)拦截和处理网络请求。本文只针对(3)。 先决条件:只在 https 环境中运行,防止 阅读全文
posted @ 2020-08-06 10:22 小猪章鱼 阅读(791) 评论(0) 推荐(0) 编辑
摘要: html <button class="btn btn-sm btn-primary pull-right" ng-click="exportData($event)"><i class="fa fa-spinner fa-pulse hidden"></i>导出表格</button> js //导 阅读全文
posted @ 2020-07-30 20:32 小猪章鱼 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 公司用的服务器,只能ssh远程操作,每天都会自动退出账户,不知道怎么回事儿,很郁闷。所以每天早起重新登录后发现进程已经关闭了,因为你运行的任务是和terminal关联在一起的,terminal关闭后,你运行的任务自然就关闭了。为了避免此事件发生,需要把任务放到后台运行,方法如下: 1.nohup命令 阅读全文
posted @ 2020-07-28 15:10 小猪章鱼 阅读(1645) 评论(0) 推荐(0) 编辑
摘要: 1、在开发过程中,容易遇到putty 右键粘贴的时候容易自动 commit 那我们如何修改 内容呢? git commit --amend 直接进入vim 编辑模式编辑 文字即可。 2、如果在开发中,已经 commit 了 但是还想多添加文件,或者对add 文件进行调整怎么办? git reset 阅读全文
posted @ 2020-07-24 15:58 小猪章鱼 阅读(566) 评论(0) 推荐(0) 编辑
摘要: 页面缓存的问题可能大家都遇到过,很多功能做完没起效果,那么怎么解决这个问题呢?这里给出我的使用的解决方法 对于一个html页面,缓存分3部分,一个是页面内容,一个是css样式,一个是JS文件1、页面内容<meta http-equiv="Expires" content="0"><meta http 阅读全文
posted @ 2020-05-20 16:25 小猪章鱼 阅读(206) 评论(0) 推荐(0) 编辑
摘要: .input{ width:100%; height:auto; min-height: 24px; font-size:14px; padding:5px 8px; border:1px solid #ddd; word-break: break-all; } .input:empty::befo 阅读全文
posted @ 2020-03-25 18:14 小猪章鱼 阅读(424) 评论(0) 推荐(0) 编辑
摘要: $sce.trustAsHtml() 只能传字符串 阅读全文
posted @ 2020-03-24 12:10 小猪章鱼 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 将 absolute 改成 fixed 阅读全文
posted @ 2020-03-19 11:37 小猪章鱼 阅读(478) 评论(0) 推荐(0) 编辑