向着太阳
向着太阳
那个图标也会隐藏吧?我现在是覆盖你的样式强制隐藏的^_^
是不转了,但是会报警告: ~~~ Warning: Unsafe legacy lifecycles will not be called for components using new component APIs. e uses getDerivedStateFromProps() but also contains the following legacy lifecycles: componentWillMount componentWillReceiveProps The above...
还有,第一次调用下拉刷新的时候如果没有请求到数据,执行一下this.setState({})方法,就是说state没有有效更新,刷新中的状态一直在那里转。
我试过,这样也不行,数据没变,this.props.children就没有变化,是不是应该在组件内部加一个是否是首次调用下拉刷新的状态来判断。
这是一个聊天页面,我又把组件还原到1.1.0版本了,刷新中的状态目前只能通过设置style为none来隐藏。 ~~~ { this.state.messages.length > 0 && this.state.messages.map((message,key) => { if (message._attributes.from !== `${chatRoomJid}/${user.name}`) { return {shoudShowTime(message._attributes.date,key) && {formatTime(message._attributes.date)}} { (message.body._text !== '' || (message.body.type && message.body.type._text) )&& } }...
要不你在组件里添加一个属性,你根据这个属性来判断是否已加载完,我在外层组件更新传入的值,比如这样: ~~~ ...... //我的回调 this.setState({isUpdated: true}) ~~~
希望添加支持拖拽和打开本地图片两种方式。
建议标题修改为往nodejs还是往php方向