react-native-navigation的迁移库

12345678910111213141516171819202122232425262728
  1. const TopBar = require('./TopBar');
  2. const BottomTabs = require('./BottomTabs');
  3. const BottomTab = require('./BottomTab');
  4. const TopTabs = require('./TopTabs');
  5. class NavigationOptions {
  6. /**
  7. * @property {options:TopBar} [topBar]
  8. * @property {options:BottomTabs} [bottomTabs]
  9. * @property {options:BottomTab} [bottomTab]
  10. * @property {string} [orientation]
  11. * @property {options:TopTabs} [topTabs]
  12. */
  13. constructor(options) {
  14. this.topBar = options.topBar && new TopBar(options.topBar);
  15. this.bottomTabs = options.bottomTabs && new BottomTabs(options.bottomTabs);
  16. this.bottomTab = options.bottomTab && new BottomTab(options.bottomTab);
  17. this.orientation = options.orientation;
  18. this.sideMenu = options.sideMenu;
  19. this.backgroundImage = options.backgroundImage;
  20. this.rootBackgroundImage = options.rootBackgroundImage;
  21. this.screenBackgroundColor = options.screenBackgroundColor;
  22. this.topTabs = options.topTabs && new TopTabs(options.topTabs);
  23. }
  24. }
  25. module.exports = NavigationOptions;