|
|
@ -3131,7 +3131,6 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
this._router.afterEach(function () { |
|
|
|
this._router.afterEach(function () { |
|
|
|
cbs.forEach(function (cb) {cb();}); |
|
|
|
cbs.forEach(function (cb) {cb();}); |
|
|
|
cbs = []; |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
this._router.init(this); |
|
|
|
this._router.init(this); |
|
|
|
} |
|
|
|
} |
|
|
@ -3139,12 +3138,29 @@ |
|
|
|
BI.shortcut("bi.router", RouterWidget); |
|
|
|
BI.shortcut("bi.router", RouterWidget); |
|
|
|
|
|
|
|
|
|
|
|
var RouterView = BI.inherit(BI.Widget, { |
|
|
|
var RouterView = BI.inherit(BI.Widget, { |
|
|
|
beforeInit: function (callback) { |
|
|
|
created: function () { |
|
|
|
cbs.push(callback); |
|
|
|
var self = this; |
|
|
|
|
|
|
|
cbs.push(function () { |
|
|
|
|
|
|
|
self.tab.setSelect($router.history.current.matched[0].path || "/"); |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
|
|
|
|
var self = this; |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
type: "bi.tab", |
|
|
|
|
|
|
|
ref: function (_ref) { |
|
|
|
|
|
|
|
self.tab = _ref; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
single: false, // 是不是单页面
|
|
|
|
|
|
|
|
logic: { |
|
|
|
|
|
|
|
dynamic: false |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
showIndex: false, |
|
|
|
|
|
|
|
cardCreator: function (v) { |
|
|
|
return $router.history.current.matched[0].components.default; |
|
|
|
return $router.history.current.matched[0].components.default; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.shortcut("bi.router_view", RouterView); |
|
|
|
BI.shortcut("bi.router_view", RouterView); |
|
|
|
|
|
|
|
|
|
|
|