摘要:
react的周期分为三个阶段 1. 实例化阶段 getDefaultProps 当父组件没有传props时,取默认的props,此阶段在引入的时候就触发,即使没有实例化(最新版本的react没有此api,直接挂载在构造器上面。) getInitialState 初始化内部的state compone 阅读全文
摘要:
js的string的所有方法 formCharCode: String.formCharCode("55"); >>>>>>"7" unicode码返回对应的字符串。 charAt: var str="hello world"; str.charAt(0); >>>>>"h"; var str="h 阅读全文