|
|
@ -3152,7 +3152,16 @@ |
|
|
|
created: function () { |
|
|
|
created: function () { |
|
|
|
var self = this, o = this.options; |
|
|
|
var self = this, o = this.options; |
|
|
|
cbs.push(this._callbackListener = function () { |
|
|
|
cbs.push(this._callbackListener = function () { |
|
|
|
self.tab.setSelect($router.history.current.fullPath || "/"); |
|
|
|
var current = $router.history.current; |
|
|
|
|
|
|
|
// 匹配的路径名(/component/:id)
|
|
|
|
|
|
|
|
var matchedPath = current.matched[o.deps] && current.matched[o.deps].path; |
|
|
|
|
|
|
|
if (matchedPath) { |
|
|
|
|
|
|
|
BI.each(current.params, function (key, value) { |
|
|
|
|
|
|
|
// 把 :id 替换成具体的值(/component/demo.td)
|
|
|
|
|
|
|
|
matchedPath = matchedPath.replace(`:${key}`, value); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
self.tab.setSelect(matchedPath || "/"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|