nextProps.defaultIndexs !== prevState.defaultIndexs) {
return {
options: nextProps.options,
indexs: nextProps.defaultIndexs
}
}
return null
}
constructor (props) {
super(props)
this.state = {
options: props.options, // 选项数据
indexs: props.defaultIndexs
关键词:如何封装一个React Native多级联动(代码完成)