摘要: 组件中请求接口数据可采用全局变量的方法(写在class外),通过判断全局变量中是否有值来决定是否要请求数据,避免每次使用组件都要请求一次值。 阅读全文
posted @ 2020-08-28 23:41 lipu1993 阅读(334) 评论(0) 推荐(0)
摘要: componentWillReceiveProps(nextProps) { const { testValues } = this.props; const { pageSize } = this.state; if (nextProps.testValues !== testValues) { 阅读全文
posted @ 2020-08-28 23:38 lipu1993 阅读(181) 评论(0) 推荐(0)
摘要: export default { 'POST /api/listData': (req, res) => { setTimeout(() => { const response = { resultCode: '0', resultObject: [ { Type: 'AES', bitLen: [ 阅读全文
posted @ 2020-08-28 23:30 lipu1993 阅读(219) 评论(0) 推荐(0)