react-router-controller
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -0,1 +1,13 @@ | ||
## 0.1.6(2017-10-25) | ||
### 解决bug | ||
### 更新 | ||
无 | ||
### 新功能 | ||
- indexPath 新增函数处理方式 | ||
## 0.1.5(2017-09-11) | ||
@@ -2,0 +14,0 @@ |
@@ -33,3 +33,5 @@ import React from 'react'; | ||
//第一个字符必须是'/',不能是main/index,要是绝对的路径 | ||
indexPath: '/main/index', | ||
indexPath: () => { | ||
return '/main/index'; | ||
}, | ||
}); | ||
@@ -36,0 +38,0 @@ |
@@ -122,3 +122,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
//这里进行了重定向 | ||
history.replace(ControllerConfig.indexPath); | ||
if (Object.prototype.toString.apply(ControllerConfig.indexPath) === '[object Function]') { | ||
history.replace(ControllerConfig.indexPath()); | ||
} else { | ||
history.replace(ControllerConfig.indexPath); | ||
} | ||
return false; | ||
@@ -125,0 +129,0 @@ } |
@@ -140,3 +140,7 @@ 'use strict'; | ||
//这里进行了重定向 | ||
history.replace(_Controller.ControllerConfig.indexPath); | ||
if (Object.prototype.toString.apply(_Controller.ControllerConfig.indexPath) === '[object Function]') { | ||
history.replace(_Controller.ControllerConfig.indexPath()); | ||
} else { | ||
history.replace(_Controller.ControllerConfig.indexPath); | ||
} | ||
return false; | ||
@@ -143,0 +147,0 @@ } |
{ | ||
"name": "react-router-controller", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "react-router-controller,react路由控制器", | ||
@@ -5,0 +5,0 @@ "main": "libs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1971563
6269