Skip to content

Commit

Permalink
fix:canEnter和canLeave的option缺失
Browse files Browse the repository at this point in the history
  • Loading branch information
leeluolee committed Jun 29, 2016
1 parent e91b2c5 commit db72456
Show file tree
Hide file tree
Showing 3 changed files with 712 additions and 531 deletions.
11 changes: 6 additions & 5 deletions example/restate.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,20 @@
component: null,

// @TODO:
canUpdate: function(){
canUpdate: function(option){

var canUpdate = this.component && this.component.canUpdate;

if( canUpdate ) return this.component.canUpdate();
if( canUpdate ) return this.component.canUpdate(option);
},


canLeave: function(){
canLeave: function(option){


var canLeave = this.component && this.component.canLeave;

if( canLeave ) return this.component.canLeave();
if( canLeave ) return this.component.canLeave(option);

},

Expand Down Expand Up @@ -160,7 +161,7 @@
}
var canEnter = this.component && this.component.canEnter;

if( canEnter ) return this.component.canEnter();
if( canEnter ) return this.component.canEnter(option);
},

enter: function( option ){
Expand Down
Loading

0 comments on commit db72456

Please sign in to comment.