摘要: 1.去charles官网下载,并拖动安装 下载地址: https://www.charlesproxy.com/download/ 2.打开charles->help->ssl Proxying-> install Charles Root Certificate 3.将证书设置为始终信任 4.勾选 阅读全文
posted @ 2020-02-06 17:25 啊友的前端历程 阅读(363) 评论(0) 推荐(0) 编辑
摘要: * 1,restrict:A:attributes;E:element;M:comment(注释);C:class * 2,transclude:为true的时候,可以在模版中增加<div ng-transclude></div>来保留标签内部内容.可以处理嵌套 * 3,replace:是否替换指令 阅读全文
posted @ 2017-10-25 14:22 啊友的前端历程 阅读(342) 评论(0) 推荐(0) 编辑
摘要: new router({ scrollBehavior (to, from, savaPosition) { if(savePosition) { //历史记录的前进后退记住的之前滚动到的位置 return savePosition } else { return {x: 0, y: 0} } // 阅读全文
posted @ 2017-07-29 17:39 啊友的前端历程 阅读(150) 评论(0) 推荐(0) 编辑
摘要: function deepCopy(p,c){ c=c || {}; for(var i in p){ if(p.hasOwnProperty(p[i])){ if(typeof(p[i]) 'object'){ c[i] = Array.isArray(p[i])?[]:{}; deepCopy( 阅读全文
posted @ 2017-07-29 14:50 啊友的前端历程 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 方法一:先把汉字用两个单字节字符代替,返回代替后的字符创长度 function getBytes1(str){ var str=str.replace(/[^\x00-\xff]/g,'**"); return str.length;} 方法二:先计算字符创长度并记录该值,循环字符串,若为汉字,长度 阅读全文
posted @ 2017-07-29 14:16 啊友的前端历程 阅读(6276) 评论(0) 推荐(0) 编辑
摘要: new router({ routes:[ { path: '/', conponent: home, name: 'Home', alias: '/index' },{ path: '/about', conponent: about, name: 'About', },{ path: '/doc 阅读全文
posted @ 2017-07-29 00:56 啊友的前端历程 阅读(446) 评论(0) 推荐(0) 编辑
摘要: new router({mode:'history', routes:[]}) 正常a标签hash模式得href='#/home',histroy模式用a标签会跳转链接刷新页面,这是因为a标签的默认行为 解决方式:用<router-link to='/home'></router-link>(不管是 阅读全文
posted @ 2017-07-29 00:19 啊友的前端历程 阅读(5259) 评论(0) 推荐(0) 编辑
摘要: 单页应用 使用步骤 安装模块 npm install vue-router --save 引入模块 import vueRouter from 'vue-router' 使用模块 Vue.use(vueRouter) 创建路由实例对象 let router=new vueRouter({ //配置参 阅读全文
posted @ 2017-07-29 00:05 啊友的前端历程 阅读(98) 评论(0) 推荐(0) 编辑
摘要: function timeCount(){ var nowTime=Date.parse(new Date()); var toTime=Date.parse(new Date('2018 01 01')); var jiange=(toTime-nowTime)/1000; var day=Mat 阅读全文
posted @ 2017-07-25 17:51 啊友的前端历程 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 方法一: $.when($.ajax({url: 'url_1',data: data, success: function() { console.log('aaaa'); }}),$.ajax({url: 'url_2', data: data, success: function(){ con 阅读全文
posted @ 2017-07-25 17:30 啊友的前端历程 阅读(824) 评论(0) 推荐(0) 编辑