mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
* fix: Tabbar icon line-height * [new feature] progress add showPivot prop * [new feature] TabItem support vue-router
23 lines
401 B
JavaScript
23 lines
401 B
JavaScript
/**
|
|
* add Vue-Router support
|
|
*/
|
|
|
|
export default {
|
|
props: {
|
|
url: String,
|
|
replace: Boolean,
|
|
to: [String, Object]
|
|
},
|
|
|
|
methods: {
|
|
routerLink() {
|
|
const { to, url, $router, replace } = this;
|
|
if (to && $router) {
|
|
$router[replace ? 'replace' : 'push'](to);
|
|
} else if (url) {
|
|
replace ? location.replace(url) : location.href = url;
|
|
}
|
|
}
|
|
}
|
|
};
|