-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
工作总结 #1
Labels
Comments
13、找出字符串中出现最多的字母
14、一键复制需要复制的元素为非input、textera
15、对象数组的去重
16、复杂判断逻辑优雅写法if...else写法
switch写法
优雅写法
将判断条件作为对象的属性名,将处理逻辑作为对象的属性值,适合一元条件判断
把两个条件拼接成字符串,并通过以条件拼接字符串作为键,以处理函数作为值的Map对象进行查找并执行,这种写法在多元条件判断时候尤其好用。
|
17、 n个数组,找出相同的项
18、判断是否为页面底部
19、slice、splice20、两个对象数组去重
|
循环中的sleep需求:循环中隔一段时间执行循环体的代码
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1、移动端iOS时间显示问题:
比如2018-08-08 24:00:00 应写成 2018/08/09 00:00:00
2、Android line-height字体居中问题:
外层元素display:table,里面元素:display:table-cell;vertical-align:middle;
3、小的图片logo可以转化为64位base码:
减少http请求
4、计算当天是当年的第几周
5、移动端滚动穿透解决方案
在modalOpen时调用ModalHelper.afterOpen();
在modalClose时调用ModalHelper.beforeClose();
网址链接:https://uedsky.com/2016-06/mobile-modal-scroll/ https://segmentfault.com/a/1190000005617307
6、iOS app调用Safari打开H5链接
8、获取当前周的周一的日期
9、页面滚动到可视区域GIF图从第一帧播放
10、防抖
1、在keyup事件外层定义一个延时器
2、在keyup事件触发时清除掉定时
11、多次异步请求相互依赖问题解决方案
a、请求后台时返回promise对象,然后then回调
b、采用async await
12、安卓端键盘调起时input被遮挡
//点击评论框 var bfscrolltop = 0;//获取软键盘唤起前浏览器滚动部分的高度 $('input[type="text"],textarea').focus(function() { //给个延迟 bfscrolltop = document.body.scrollTop;//获取软键盘唤起前浏览器滚动部分的高度 interval = setInterval(function() { document.body.scrollTop = document.body.scrollHeight}, 100 ); window.addEventListener('touchmove', fn, false); }).blur(function(){ clearInterval(interval); }); //如果你的页面中使用了iscorll插件,这时候你需要处理评论框的滑动事件————拒绝滑动 function fn(ev) { var _target = ev.target || ev.srcElement; if(_target.nodeName != 'TEXTAREA') { $('.pinglun_footerr_text').blur(); } };
--------------------- 本文来自 风中乘凉 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/qq_37231097/article/details/76614702?utm_source=copy小程序客服采用button实现
本文来自 Afanbaby 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/Afanbaby/article/details/78796968?utm_source=copy
The text was updated successfully, but these errors were encountered: