mirror of
https://github.com/youzan/vant.git
synced 2025-10-17 00:14:18 +00:00
[new feature] Tabbar: support match route by to.name (#4148)
This commit is contained in:
@@ -27,8 +27,8 @@ export default createComponent({
|
||||
routeActive() {
|
||||
const { to, $route } = this;
|
||||
if (to && $route) {
|
||||
const path = isObj(to) ? to.path : to;
|
||||
return $route.path === path;
|
||||
const config = isObj(to) ? to : { path: to };
|
||||
return config.path === $route.path || config.name === $route.name;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user