我的问题跟你的类似我在父组件传值给子组件,然后子组件接收不了。父组件:<Tab pageurl={ this.state.pageurl } /> 子组件: componentDidMount () { console.log('tab' ,this.props.pageurl) }
操了,taro中,一个js文件中只能写一个组件,写多个其他组件,直接引用会无效。必须要在其他独立的文件中写组件然后import引入才可以编译