fix: history.pushState

This commit is contained in:
chenos 2023-03-15 16:16:04 +08:00
parent 8b205ec8b0
commit 9e7e6a6051

View File

@ -170,7 +170,7 @@ export const Page = (props) => {
onTabClick={(activeKey) => { onTabClick={(activeKey) => {
setLoading(true); setLoading(true);
setActiveKey(activeKey); setActiveKey(activeKey);
window.history.pushState({}, '', location.pathname + `?tab=` + activeKey); window.history.pushState({}, '', window.location.pathname + `?tab=` + activeKey);
setTimeout(() => { setTimeout(() => {
setLoading(false); setLoading(false);
}, 50); }, 50);