新手提问,导航器使用问题



  • const orderNavigator = createMaterialTopTabNavigator({
    all:{screen:AllOrder,
    navigationOptions:{
    tabBarLabel:"全部",
    }},
    unprocessed:{screen: UnprocessedOrder,
    navigationOptions:{
    tabBarLabel:"待处理",
    }
    },
    unconfirmed:{screen:UnconfirmedOrder,
    navigationOptions:{
    tabBarLabel:"待确认",
    }},
    processing:{screen:ProcessingOrder,
    navigationOptions:{
    tabBarLabel:"进行中",
    }},
    completed:{screen:CompletedOrder,
    navigationOptions:{
    tabBarLabel:"已完成",
    }},
    cancelled:{screen:CancelledOrder,
    navigationOptions:{
    tabBarLabel:"已取消",
    }}
    },{
    initialRouteName:"all",
    tabBarPosition:"top",
    lazy:"true",
    tabBarOptions:{
    activeTintColor:"#FC781D",
    inactiveTintColor:"#000000",
    scrollEnabled: true,
    style:{
    backgroundColor:"#ffffff"
    },
    labelStyle:{
    fontSize:13
    },
    tabStyle:{
    width:80
    }
    }
    })
    export default class Order extends Component{
    render(){
    return (
    <View style={styles.flex}>
    <orderNavigator/>
    </View>
    );
    }
    }

    为什么一直报错说我的orderNavigator不是一个控件



  • 0_1544067365004_31501147-2b21-4729-879c-001ff32bde35-image.png



  • @晴明 哇,豁然开朗了,大佬谢谢