Browse Source

BI-65801 refactor: 预研表路由跳转时发现的问题

es6
windy 5 years ago
parent
commit
ed42191fce
  1. 1
      changelog.md
  2. 7
      src/router/router.js

1
changelog.md

@ -1,5 +1,6 @@
# 更新日志 # 更新日志
2.0(2020-05) 2.0(2020-05)
- 修复调用BI.history.navigate(XXX, {trigger: false})时, XXX包含中文空格等字符仍然触发回调的问题
- 新增BI.after和BI.before方法 - 新增BI.after和BI.before方法
- 修复bi.button设置宽度并配置iconCls后,文本很长的情况下显示截断的问题 - 修复bi.button设置宽度并配置iconCls后,文本很长的情况下显示截断的问题
- 填加bi-user-select-enable和bi-user-select-disable通用类名 - 填加bi-user-select-enable和bi-user-select-disable通用类名

7
src/router/router.js

@ -490,7 +490,12 @@
// calls `loadUrl`, normalizing across the hidden iframe. // calls `loadUrl`, normalizing across the hidden iframe.
checkUrl: function (e) { checkUrl: function (e) {
var current = this.getFragment(); var current = this.getFragment();
try {
// getFragment 得到的值是编码过的,而this.fragment是没有编码过的
// 英文路径没有问题,遇上中文和空格有问题了
current = decodeURIComponent(current);
} catch {
}
// If the user pressed the back button, the iframe's hash will have // If the user pressed the back button, the iframe's hash will have
// changed and we should use that for comparison. // changed and we should use that for comparison.
if (current === this.fragment && this.iframe) { if (current === this.fragment && this.iframe) {

Loading…
Cancel
Save