摘要: 转自:https://www.cnblogs.com/gdsblog/p/7348375.html react 中compent getDefaultProps object getDefaultProps() 执行过一次后,被创建的类会有缓存,映射的值会存在this.props,前提是这个prop 阅读全文
posted @ 2018-10-12 17:31 wonderfulviews 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 有3个页面 a,b,c 如果当前页面是c页面,并且c页面是这样跳转过来的:a->b->c 1:b->c 是通过window.location.replace("..xx/c") 此时b页面的url会被c页面代替,并且点击后退按钮时会回退到a页面(最开始的页面) 2:b->c是通过window.loc 阅读全文
posted @ 2018-10-12 11:04 wonderfulviews 阅读(10118) 评论(0) 推荐(0) 编辑
摘要: 转自:https://www.cnblogs.com/SamWeb/p/8417940.html 用 async/await 来处理异步 昨天看了一篇vue的教程,作者用async/ await来发送异步请求,从服务端获取数据,代码很简洁,同时async/await 已经被标准化,是时候学习一下了。 阅读全文
posted @ 2018-10-12 11:03 wonderfulviews 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 1.constructor( ) super( )的基本含义 constructor() super()的基本含义 这是ES6对类的默认方法,通过new,命令生成对象实例时自动调用该方法。并且,该方法是类中必须有的,如果没有显示定义,则会默认添加空的 constructor() 方法 super( 阅读全文
posted @ 2018-10-12 10:53 wonderfulviews 阅读(128) 评论(0) 推荐(0) 编辑