this.props.children
指的是传入到组件的孩子个数
如Test组件
<Test>
<View><Text>1</Text></View>
<Text>2</Text>
<Text>3</Text>
</Test>
那么这里的 var content = this.props.children;
console.log(content.length) // 3
this.props.children
指的是传入到组件的孩子个数
如Test组件
<Test>
<View><Text>1</Text></View>
<Text>2</Text>
<Text>3</Text>
</Test>
那么这里的 var content = this.props.children;
console.log(content.length) // 3