mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
[Doc] support title anchor (#3845)
This commit is contained in:
@@ -31,6 +31,10 @@ export function initIframeRouter() {
|
||||
|
||||
window.changePath = function (lang, path = '') {
|
||||
setLang(lang);
|
||||
window.vueRouter.replace(path);
|
||||
|
||||
// should preserve hash for anchor
|
||||
if (window.vueRouter.currentRoute.path !== path) {
|
||||
window.vueRouter.replace(path);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user