会员
众包
新闻
博问
AI培训
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
誰舆徴夆
博客园
首页
新随笔
联系
订阅
管理
2019年3月8日
js深拷贝和浅拷贝
摘要: 浅拷贝方法: function qianCopy(obj) { if (typeof obj !== 'object') { return; } const tempObj = obj instanceof Array ? [] : {}; for(let key in obj) { if (obj
阅读全文
posted @ 2019-03-08 16:32 誰舆徴夆
阅读(95)
评论(0)
推荐(0)
编辑
2019年2月20日
vue 异步刷新页面,
摘要: 入口文件vue.app中 <div id="app"> <router-view v-if="isRouterAlive" /> </div> </template> <script> export default { name: 'App', provide (){ return { reload
阅读全文
posted @ 2019-02-20 16:17 誰舆徴夆
阅读(1218)
评论(0)
推荐(0)
编辑
vue强制刷新组件
摘要: <component v-if="hackReset"></component>(组件名称) data:hackReset (事件执行) this.hackReset = false this.$nextTick(() => { this.hackReset = true })
阅读全文
posted @ 2019-02-20 11:00 誰舆徴夆
阅读(309)
评论(0)
推荐(0)
编辑
2017年7月12日
js判断终端以及APP应用判断
摘要: **第一种:通过判断浏览器的userAgent,用正则来判断是否是ios和Android客户端。代码如下:** <script type="text/javascript"> var u = navigator.userAgent; var isAndroid = u.indexOf('Androi
阅读全文
posted @ 2017-07-12 11:04 誰舆徴夆
阅读(222)
评论(0)
推荐(0)
编辑
2017年6月30日
微信返回上一页的按钮会强制性使用页面缓存,不刷新页面
摘要: //解决微信内核为wkwebview时返回上一页,界面不刷新的问题 window.onpageshow = function(event){ if (event.persisted) { window.location.reload(); } };
阅读全文
posted @ 2017-06-30 15:10 誰舆徴夆
阅读(306)
评论(0)
推荐(0)
编辑
2017年6月9日
json键和值转数组
摘要: var jb={"美的":49,"三星":35,"海信":25,"格力":16,"方太":14}; for(var key in jb){ alert(key);//json对象的key alert(jb[key]);//json对象的值 }
阅读全文
posted @ 2017-06-09 13:57 誰舆徴夆
阅读(165)
评论(0)
推荐(0)
编辑
2015年2月3日
inputClient.js
摘要: inputClient.js
阅读全文
posted @ 2015-02-03 15:52 誰舆徴夆
阅读(156)
评论(0)
推荐(0)
编辑
2015年1月27日
jquery判断点击事件是否指定区域
摘要: $(document).click(function(e){ e = window.event || e; // 兼容IE7 obj = $(e.srcElement || e.target); if ($(obj).is("#elem,#elem *")) { // alert('内部区域'); } else { alert('你的点击不在目标区域'); } });
阅读全文
posted @ 2015-01-27 15:36 誰舆徴夆
阅读(422)
评论(0)
推荐(0)
编辑
2014年12月15日
倒计时样式
摘要: 倒计时样式
阅读全文
posted @ 2014-12-15 10:18 誰舆徴夆
阅读(273)
评论(0)
推荐(0)
编辑
2014年12月8日
高度自适应
摘要: 多栏布局时高度自适应:父级over-flow:hidden; 内容外层:padding-bottom:9999px;margin-bottom:-9999px; 或者父级布局position:relative;内容区position:absolute;top:0;left:0;bottom:0;
阅读全文
posted @ 2014-12-08 17:35 誰舆徴夆
阅读(92)
评论(0)
推荐(0)
编辑
下一页
公告