摘要:
1. 行内样式<div style={{ width:'200px', height:'80px', backgroundColor:'yellow', fontSize:'24px', textAlign:'center' }}>This is Page1!</div> 2. 声明样式render 阅读全文
摘要:
1、初始化 getDefaultProps() 设置默认的props,也可以用dufaultProps设置组件的默认属性。 getInitialState() 在使用es6的class语法时是没有这个钩子函数的,可以直接在constructor中定义this.state。 此时可以访问this.pr 阅读全文