@@ -13,15 +13,17 @@ ActionConst.POP_AND_REPLACE,'pop'),_defineProperty(_actionMap,
13
13
ActionConst . POP_TO , 'popTo' ) , _defineProperty ( _actionMap ,
14
14
ActionConst . REFRESH , 'refresh' ) , _defineProperty ( _actionMap ,
15
15
ActionConst . RESET , 'reset' ) , _defineProperty ( _actionMap ,
16
- ActionConst . PUSH_OR_POP , 'push' ) , _actionMap ) ;
16
+ ActionConst . PUSH_OR_POP , 'push' ) , _defineProperty ( _actionMap ,
17
+ ActionConst . POP_AND_PUSH , 'popAndPush' ) , _actionMap ) ;
17
18
18
19
19
20
var supportedActions = exports . supportedActions = ( _supportedActions = { } , _defineProperty ( _supportedActions ,
20
21
ActionConst . PUSH , _reactNavigation . NavigationActions . NAVIGATE ) , _defineProperty ( _supportedActions ,
21
22
ActionConst . JUMP , _reactNavigation . NavigationActions . NAVIGATE ) , _defineProperty ( _supportedActions ,
22
23
ActionConst . BACK , _reactNavigation . NavigationActions . BACK ) , _defineProperty ( _supportedActions ,
23
24
ActionConst . REFRESH , _reactNavigation . NavigationActions . BACK ) , _defineProperty ( _supportedActions ,
24
- ActionConst . RESET , _reactNavigation . NavigationActions . RESET ) , _supportedActions ) ;
25
+ ActionConst . RESET , _reactNavigation . NavigationActions . RESET ) , _defineProperty ( _supportedActions ,
26
+ ActionConst . REPLACE , _reactNavigation . NavigationActions . RESET ) , _supportedActions ) ;
25
27
26
28
function filterParam ( data ) {
27
29
if ( data . toString ( ) !== '[object Object]' ) {
@@ -193,7 +195,7 @@ currentState=newState;
193
195
if ( nextScene === routeName ) {
194
196
_this . setState ( newState ) ;
195
197
}
196
- } else if ( type === ActionConst . REPLACE ) {
198
+ } else if ( type === ActionConst . POP_AND_PUSH ) {
197
199
_this . pop ( ) ;
198
200
_this . push . apply ( _this , [ routeName ] . concat ( params ) ) ;
199
201
}
@@ -245,14 +247,22 @@ _this.refresh(res.refresh);
245
247
} ; this .
246
248
247
249
popTo = function ( routeName ) { for ( var _len5 = arguments . length , params = Array ( _len5 > 1 ?_len5 - 1 :0 ) , _key5 = 1 ; _key5 < _len5 ; _key5 ++ ) { params [ _key5 - 1 ] = arguments [ _key5 ] ; }
248
- _this . run . apply ( _this , [ ActionConst . POP_TO , routeName ] . concat ( params ) ) ;
250
+ _this . run . apply ( _this , [ ActionConst . POP_TO , routeName , null ] . concat ( params ) ) ;
249
251
} ; this .
250
252
251
- replace = function ( routeName ) { for ( var _len6 = arguments . length , params = Array ( _len6 > 1 ?_len6 - 1 :0 ) , _key6 = 1 ; _key6 < _len6 ; _key6 ++ ) { params [ _key6 - 1 ] = arguments [ _key6 ] ; }
252
- _this . run . apply ( _this , [ ActionConst . REPLACE , routeName ] . concat ( params ) ) ;
253
+ popAndPush = function ( routeName ) { for ( var _len6 = arguments . length , params = Array ( _len6 > 1 ?_len6 - 1 :0 ) , _key6 = 1 ; _key6 < _len6 ; _key6 ++ ) { params [ _key6 - 1 ] = arguments [ _key6 ] ; }
254
+ _this . run . apply ( _this , [ ActionConst . POP_AND_PUSH , routeName , null ] . concat ( params ) ) ;
253
255
} ; this .
254
256
255
- reset = function ( routeName ) { for ( var _len7 = arguments . length , params = Array ( _len7 > 1 ?_len7 - 1 :0 ) , _key7 = 1 ; _key7 < _len7 ; _key7 ++ ) { params [ _key7 - 1 ] = arguments [ _key7 ] ; }
257
+ replace = function ( routeName ) { for ( var _len7 = arguments . length , params = Array ( _len7 > 1 ?_len7 - 1 :0 ) , _key7 = 1 ; _key7 < _len7 ; _key7 ++ ) { params [ _key7 - 1 ] = arguments [ _key7 ] ; }
258
+ var res = uniteParams ( routeName , params ) ;
259
+ _this . run ( ActionConst . REPLACE , routeName , { key :routeName , index :0 , actions :[ _reactNavigation . NavigationActions . navigate ( {
260
+ routeName :routeName ,
261
+ params :res } ) ] } ) ;
262
+
263
+ } ; this .
264
+
265
+ reset = function ( routeName ) { for ( var _len8 = arguments . length , params = Array ( _len8 > 1 ?_len8 - 1 :0 ) , _key8 = 1 ; _key8 < _len8 ; _key8 ++ ) { params [ _key8 - 1 ] = arguments [ _key8 ] ; }
256
266
var res = uniteParams ( routeName , params ) ;
257
267
_this . run ( ActionConst . RESET , routeName , { key :null , index :0 , actions :[ _reactNavigation . NavigationActions . navigate ( {
258
268
routeName :routeName ,
0 commit comments