fix: ui issues

This commit is contained in:
jialin
2026-02-06 11:13:49 +08:00
parent d54722609c
commit 7f3d6bb55f
35 changed files with 364 additions and 141 deletions
@@ -1,9 +1,11 @@
import { PageAction } from '@/config';
import { PageActionType } from '@/config/types';
import useBodyScroll from '@/hooks/use-body-scroll';
import { useState } from 'react';
import { RouteItem as ListItem } from '../config/types';
const useAccessControl = () => {
const { saveScrollHeight, restoreScrollHeight } = useBodyScroll();
const [openModalStatus, setOpenModalStatus] = useState<{
open: boolean;
action: PageActionType;
@@ -27,6 +29,7 @@ const useAccessControl = () => {
currentData,
title: title
});
saveScrollHeight();
};
const closeModal = () => {
@@ -36,6 +39,7 @@ const useAccessControl = () => {
currentData: undefined,
title: ''
});
restoreScrollHeight();
};
return {
@@ -1,9 +1,11 @@
import { PageAction } from '@/config';
import { PageActionType } from '@/config/types';
import useBodyScroll from '@/hooks/use-body-scroll';
import { useState } from 'react';
import { RouteItem as ListItem } from '../config/types';
const useCreateRoute = (options?: { refresh: () => void }) => {
const { saveScrollHeight, restoreScrollHeight } = useBodyScroll();
const [openModalStatus, setOpenModalStatus] = useState<{
open: boolean;
action: PageActionType;
@@ -27,6 +29,7 @@ const useCreateRoute = (options?: { refresh: () => void }) => {
currentData,
title: title
});
saveScrollHeight();
};
const closeModal = () => {
@@ -36,6 +39,7 @@ const useCreateRoute = (options?: { refresh: () => void }) => {
currentData: undefined,
title: ''
});
restoreScrollHeight();
};
return {