摘要: 浅拷贝方法: 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) 编辑
摘要: 入口文件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) 编辑
摘要: <component v-if="hackReset"></component>(组件名称) data:hackReset (事件执行) this.hackReset = false this.$nextTick(() => { this.hackReset = true }) 阅读全文
posted @ 2019-02-20 11:00 誰舆徴夆 阅读(309) 评论(0) 推荐(0) 编辑
摘要: **第一种:通过判断浏览器的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) 编辑
摘要: //解决微信内核为wkwebview时返回上一页,界面不刷新的问题 window.onpageshow = function(event){ if (event.persisted) { window.location.reload(); } }; 阅读全文
posted @ 2017-06-30 15:10 誰舆徴夆 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑
摘要: inputClient.js 阅读全文
posted @ 2015-02-03 15:52 誰舆徴夆 阅读(156) 评论(0) 推荐(0) 编辑
摘要: $(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) 编辑
摘要: 倒计时样式 阅读全文
posted @ 2014-12-15 10:18 誰舆徴夆 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 多栏布局时高度自适应:父级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) 编辑