Browse Source

Pull request #1357: BI-66406 refactor: BI.history提供与注册路径对应的卸载路径的方法

Merge in VISUAL/fineui from ~WINDY/fui:master to master

* commit 'cf2875b9e7059998468c5bf861ee01cbf7934da0':
  BI-66406 refactor: BI.history提供与注册路径对应的卸载路径的方法
es6
windy 4 years ago
parent
commit
8b0b50836a
  1. 1
      changelog.md
  2. 10
      src/router/router.js

1
changelog.md

@ -1,5 +1,6 @@
# 更新日志
2.0(2020-06)
- BI.history提供与注册路由对应的卸载路由方法unRoute
- 修复了单选标红combo类setValue为空和空数组行为不一致的问题
- 单选列表支持新增选项
- 增加组件shortcut未定义的错误提示

10
src/router/router.js

@ -486,6 +486,16 @@
this.handlers.unshift({route: route, callback: callback});
},
// remove a route match in routes
unRoute: function (route) {
var index = _.findIndex(this.handlers, function (handler) {
return handler.route.test(route);
});
if (index > -1) {
this.handlers.splice(index, 1);
}
},
// Checks the current URL to see if it has changed, and if it has,
// calls `loadUrl`, normalizing across the hidden iframe.
checkUrl: function (e) {

Loading…
Cancel
Save