Commit e38dd2d8 authored by GuanHua's avatar GuanHua

feat:网页标签页标题修改

parent bde37f35
......@@ -105,9 +105,11 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
const animationFrameId = requestAnimationFrame(() => {
setSelectedKeys(keys);
});
console.log(currentRouter, "currentRouter")
return () =>
window.cancelAnimationFrame &&
window.cancelAnimationFrame(animationFrameId);
}, [location.pathname]);
useEffect(() => {
......@@ -122,9 +124,10 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
setOpenKeys([])
}
}, [currentRouter, location.pathname, collapsed])
return (
<ProLayout
title={``}
pageTitleRender={() => currentRouter ? currentRouter.name : window.location.href}
style={{ minHeight: '100vh' }}
logo={logo}
formatMessage={formatMessage}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment