mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
优化后退前进问题
This commit is contained in:
parent
a8dd6f16c3
commit
9580335b28
@ -900,11 +900,11 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//刷新框架参数
|
//刷新框架参数
|
||||||
refreshVcFramework();
|
//refreshVcFramework();
|
||||||
//修改锚点
|
//修改锚点
|
||||||
|
|
||||||
location.hash = url.substring(url.indexOf("#") + 1, url.length);
|
location.hash = url.substring(url.indexOf("#") + 1, url.length);
|
||||||
vcFramework.reBuilderVcTree();
|
//vcFramework.reBuilderVcTree();
|
||||||
};
|
};
|
||||||
|
|
||||||
refreshVcFramework = function () {
|
refreshVcFramework = function () {
|
||||||
@ -1346,6 +1346,21 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
})(window.vcFramework);
|
})(window.vcFramework);
|
||||||
|
/**
|
||||||
|
* 锚点变化监听
|
||||||
|
*/
|
||||||
|
(function (vcFramework) {
|
||||||
|
|
||||||
|
window.addEventListener("hashchange", function (e) {
|
||||||
|
let _componentUrl = location.hash;
|
||||||
|
//判断是否为组件页面
|
||||||
|
if (!vcFramework.notNull(_componentUrl)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
refreshVcFramework();
|
||||||
|
vcFramework.reBuilderVcTree();
|
||||||
|
}, false);
|
||||||
|
})(window.vcFramework);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user