refactor: ui/ux

This commit is contained in:
jialin
2026-04-08 18:54:06 +08:00
committed by jialin
parent 06160546a6
commit 1c09cc6c8c
22 changed files with 325 additions and 167 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ const Wrapper = styled.div`
display: flex;
align-items: center;
gap: 24px;
height: 40px;
height: 32px;
`;
const DropdownWrapper = styled.div`
min-width: 160px;
+28 -6
View File
@@ -215,10 +215,28 @@ export default (props: any) => {
}, [matchedRoute]);
useEffect(() => {
const body = document.querySelector('body');
if (body) {
const ins = initialize(body);
window.__GPUSTACK_BODY_SCROLLER__ = ins;
const initializeScroller = () => {
// const body = document.querySelector('.ant-pro-grid-content-children');
// if (body) {
// const ins = initialize(body);
// window.__GPUSTACK_BODY_SCROLLER__ = ins;
// return true;
// }
// return false;
return true;
};
// Try to initialize immediately
if (!initializeScroller()) {
// If element not found, retry with requestAnimationFrame
const rafId = requestAnimationFrame(() => {
if (!initializeScroller()) {
// If still not found, retry after a short delay
const timeoutId = setTimeout(initializeScroller, 100);
return () => clearTimeout(timeoutId);
}
});
return () => cancelAnimationFrame(rafId);
}
}, [initialize]);
@@ -312,6 +330,8 @@ export default (props: any) => {
});
};
console.log('userConfig==========title', userConfig.title);
return (
<ConfigProvider
componentSize="large"
@@ -336,7 +356,7 @@ export default (props: any) => {
<DarkMask></DarkMask>
<ProLayout
fixSiderbar
fixedHeader={true}
fixedHeader={false}
breadcrumbRender={false}
route={route}
location={location}
@@ -384,7 +404,9 @@ export default (props: any) => {
<Outlet />
) : (
<PageContainerInner>
<Outlet />
<div>
<Outlet />
</div>
</PageContainerInner>
)}
</Exception>