zoukankan      html  css  js  c++  java
  • react-navigation

    TabNavigator的使用
      定义一个整体的tab属性
    
    
    import {TabNavigator,StackNavigator,TabBarBottom} from 'react-navigation'

    const
    MyTab = TabNavigator({ Home: { screen: Main, navigationOptions: ({navigation}) => ({ tabBarLabel:'主页' }), }, Manage: { screen: UserManage, navigationOptions: ({navigation}) => ({ tabBarLabel:'管理' }), }, Today: { screen: UserToday, navigationOptions: ({navigation}) => ({ tabBarLabel:'今日' }), } }, { tabBarComponent:TabBarBottom,, animationEnabled: false, // 切换页面时是否有动画效果 tabBarPosition: 'bottom', // 显示在底端,android 默认是显示在页面顶端的 swipeEnabled: true, // 是否可以左右滑动切换tab backBehavior: 'none', // 按 back 键是否跳转到第一个Tab(首页), none 为不跳转 lazy:true, tabBarOptions: { activeTintColor: '#ff8500', // 文字和图片选中颜色 inactiveTintColor: '#999', // 文字和图片未选中颜色 showIcon: false, // android 默认不显示 icon, 需要设置为 true 才会显示 indicatorStyle: { height: 0 // 如TabBar下面显示有一条线,可以设高度为0后隐藏 }, style: { backgroundColor: '#fff', // TabBar 背景色 // height: 30 }, labelStyle: { fontSize: 20, // 文字大小 }, }, });
    Main、UserManage、UserToday是react组件
    tabBarComponent:TabBarBottom //这一条一定要加,不加跳转有卡顿,TabBarBottom引用自react-navgition
    // 渲染返回定义好的tab
    render(){   
    return(<MyTab/>) }
     
    开黑吗我亚索贼6
  • 相关阅读:
    WCF上传下载文件
    WCF使用相关
    .net WCF WF4.5 状态机、书签与持久化
    .net WCF WF4.5
    CSS小东西
    asp.net mvc导出execl_转载
    winform自定义控件开发
    html问题汇总
    工作中的小东西
    jQuery事件
  • 原文地址:https://www.cnblogs.com/insight0912/p/7772831.html
Copyright © 2011-2022 走看看