react-native-navigation的迁移库

Navigation.js 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. import * as ContainerRegistry from './containers/ContainerRegistry';
  2. export function registerContainer(containerKey, getContainerFunc) {
  3. ContainerRegistry.registerContainer(containerKey, getContainerFunc);
  4. }
  5. export function startApp(params) {
  6. //
  7. }
  8. export function push(params) {
  9. //
  10. }
  11. export function pop(params) {
  12. //
  13. }
  14. export function showModal(params) {
  15. //
  16. }
  17. export function dismissModal(params) {
  18. //
  19. }
  20. export function dismissAllModals(params) {
  21. //
  22. }
  23. export function showLightbox(params) {
  24. //
  25. }
  26. export function dismissLightbox(params) {
  27. //
  28. }
  29. export function showInAppNotification(params) {
  30. //
  31. }
  32. export function dismissInAppNotification(params) {
  33. //
  34. }
  35. export function popToRoot(params) {
  36. //
  37. }
  38. export function newStack(params) {
  39. //
  40. }
  41. // new work on src/Navigation:
  42. //+function startApp(layout) {
  43. // + return platformSpecific.startApp(layout);
  44. // +}
  45. //+
  46. //+ startSingleScreenApp: startSingleScreenApp,
  47. // + startApp: startApp
  48. // new work on src/newParams.json:
  49. //
  50. //{
  51. // "screen": {
  52. // "screen": "example.FirstTabScreen",
  53. // "title": "Navigation",
  54. // "navigatorStyle": {
  55. // "navBarBackgroundColor": "#4dbce9",
  56. // "navBarTextColor": "#ffff00",
  57. // "navBarSubtitleTextColor": "#ff0000",
  58. // "navBarButtonColor": "#ffffff",
  59. // "statusBarTextColorScheme": "light",
  60. // "tabBarBackgroundColor": "#4dbce9",
  61. // "tabBarButtonColor": "#ffffff",
  62. // "tabBarSelectedButtonColor": "#ffff00"
  63. // },
  64. // "navigatorID": "navigatorID1_nav",
  65. // "screenInstanceID": "screenInstanceID2",
  66. // "navigatorEventID": "screenInstanceID2_events",
  67. // "navigatorButtons": {
  68. // "leftButtons": [
  69. // {
  70. // "icon": "http://localhost:8081/assets/img/navicon_menu@2x.png?platform=ios&hash=940519e495eac2a6236034f2bf88ce90",
  71. // "id": "menu"
  72. // }
  73. // ],
  74. // "rightButtons": [
  75. // {
  76. // "title": "Edit",
  77. // "id": "edit",
  78. // "enabled": true
  79. // },
  80. // {
  81. // "icon": "http://localhost:8081/assets/img/navicon_add@2x.png?platform=ios&hash=667fefa47fb5daebbc3943669dc6eb26",
  82. // "id": "add",
  83. // "enabled": true
  84. // }
  85. // ]
  86. // },
  87. // "screenId": "example.FirstTabScreen",
  88. // "styleParams": {
  89. // "topBarColor": 4283284713,
  90. // "titleBarTitleColor": 4294967040,
  91. // "titleBarButtonColor": 4294967295,
  92. // "drawBelowTopBar": true,
  93. // "drawScreenAboveBottomTabs": true,
  94. // "bottomTabsColor": 4283284713,
  95. // "bottomTabsButtonColor": 4294967295,
  96. // "bottomTabsSelectedButtonColor": 4294967040
  97. // },
  98. // "navigationParams": {
  99. // "screenInstanceID": "screenInstanceID2",
  100. // "navigatorID": "navigatorID1_nav",
  101. // "navigatorEventID": "screenInstanceID2_events"
  102. // }
  103. //},
  104. // "drawer": {
  105. // "left": {
  106. // "screen": "example.SideMenu"
  107. // }
  108. //},
  109. // "appStyle": null,
  110. // "sideMenu": {
  111. // "left": {
  112. // "screenId": "example.SideMenu",
  113. // "navigatorID": "navigatorID3_nav",
  114. // "screenInstanceID": "screenInstanceID4",
  115. // "navigatorEventID": "screenInstanceID4_events",
  116. // "navigationParams": {
  117. // "screenInstanceID": "screenInstanceID4",
  118. // "navigatorID": "navigatorID3_nav",
  119. // "navigatorEventID": "screenInstanceID4_events"
  120. // }
  121. // },
  122. // "right": null
  123. //},
  124. // "animateShow": true
  125. //}
  126. // new work on platformSpecificDeprecated.ios.js:
  127. import Navigation from './../Navigation';
  128. //import Controllers, {Modal, Notification} from './controllers';
  129. //+import _ from 'lodash';
  130. //+import PropRegistry from '../PropRegistry';
  131. //+import * as newPlatformSpecific from './../platformSpecific';
  132. //+
  133. //const React = Controllers.hijackReact();
  134. //const {
  135. // ControllerRegistry,
  136. // TabBarControllerIOS,
  137. // NavigationControllerIOS,
  138. // DrawerControllerIOS
  139. //} = React;
  140. //-import _ from 'lodash';
  141. //
  142. //-import PropRegistry from '../PropRegistry';
  143. //+function startApp(layout) {
  144. // + newPlatformSpecific.startApp(layout);
  145. // +}
  146. //
  147. //function startTabBasedApp(params) {
  148. // if (!params.tabs) {
  149. // @@ -566,6 +571,7 @@ function dismissContextualMenu() {
  150. // }
  151. //
  152. // export default {
  153. // + startApp,
  154. // startTabBasedApp,
  155. // startSingleScreenApp,
  156. // navigatorPush,
  157. //new work on platformSpecific.ios.js:
  158. //-module.exports = {};
  159. //+import React, {Component} from 'react';
  160. //+import {AppRegistry, NativeModules} from 'react-native';
  161. //+import _ from 'lodash';
  162. //+import PropRegistry from './PropRegistry';
  163. //+
  164. // +const NativeAppMAnager = NativeModules.RCCManager;
  165. //+
  166. // +function startApp(layout) {
  167. // +
  168. // + NativeAppMAnager.startApp(layout);
  169. // +}
  170. //+
  171. //+module.exports = {
  172. // + startApp
  173. // +};