React Native Navigation Wix推屏问题



我有一个基于WIX的基于标签的导航,每次我尝试从选项卡的任何屏幕上推出屏幕,都不会做任何事情,但是当我尝试按下时从第一个选项卡中起作用,但我无法从中推出的任何其他选项卡

Promise.all(iconTabs).then(sources => { // after the promises end
        Navigation.setRoot({
            root: {
                bottomTabs: {
                    children: [{
                        stack: {
                            children: [{
                                component: { // 1
                                    name: screenNames['listInvoice'].name,
                                }
                            }],
                            options: {
                                bottomTab: {
                                    text: screenNames['listInvoice'].title,
                                    icon: sources[0],
                                    selectedIconColor: DEFAULT_COLOR,
                                },
                                topBar: getTopBar()
                            }
                        }
                    },
                        {
                            component: { // 2
                                name: screenNames['listReceipt'].name,
                                options: {
                                    bottomTab: {
                                        text:  screenNames['listReceipt'].title,
                                        icon: sources[1],
                                        selectedIconColor: DEFAULT_COLOR,
                                    },
                                    topBar: getTopBar()
                                }
                            } ,
                        },
                        {
                            component: { // 2
                                name: screenNames['listCustomer'].name,
                                options: {
                                    bottomTab: {
                                        text:  screenNames['listCustomer'].title,
                                        icon: sources[2],
                                        selectedIconColor: DEFAULT_COLOR,
                                    },
                                    topBar: getTopBar()
                                }
                            } ,
                        },
                        {
                            component: { // 2
                                name: screenNames['listInvoiceItem'].name,
                                options: {
                                    bottomTab: {
                                        text:  screenNames['listInvoiceItem'].title,
                                        icon: sources[3],
                                        selectedIconColor: DEFAULT_COLOR,
                                    },
                                    topBar: getTopBar()
                                }
                            } ,
                        },
                        {
                            component: { // 2
                                name: screenNames['listSupplier'].name,
                                options: {
                                    bottomTab: {
                                        text:  screenNames['listSupplier'].title,
                                        icon: sources[4],
                                        selectedIconColor: DEFAULT_COLOR,
                                    },
                                    topBar: getTopBar()
                                }
                            } ,
                        },
                    ]
                }
            }
        });
    });
                                                    -->
Navigation.push(currentScreen, {
            component: {
                name: screenName,
                options: {
                    topBar: getTopBar(),
                    bottomTabs: {
                        visible: false,
                        drawBehind: true
                    }
                }
            }
        });

->

环境

  • React Native Navigation版本:最新版本反应新的-CLI:2.0.1反应:0.58.4
  • 平台Android

我也有同样的问题。您也必须启动其他选项卡一个堆栈布局。喜欢:

   bottomTabs: {
      children: [
        ........
        {
          stack: {
            children: [
              { 
                component: { screenNames['listReceipt'].name }
              }
            ]
          }
        },
       {
          stack: {
            children: [
              { 
                component: { screenNames['listCustomer'].name }
              }
            ]
          }
        }
      ]
    }

另请参阅此处:https://github.com/wix/react-native-navigation/issues/4786#issuecomment-467648825

相关内容

  • 没有找到相关文章

最新更新