修复定时任务列表虚拟滚动

This commit is contained in:
whyour 2023-08-04 22:24:54 +08:00
parent a9da8fffc1
commit 624c9374e5
2 changed files with 7 additions and 1 deletions

View File

@ -13,7 +13,7 @@ export default function Name<
options: Options<TData, [TParams]>; options: Options<TData, [TParams]>;
}) { }) {
const { loading, data } = useRequest(service, options); const { loading, data } = useRequest(service, options);
console.log(loading, data);
return ( return (
<Spin spinning={loading}> <Spin spinning={loading}>
<Typography.Text ellipsis={true}>{data?.data?.name}</Typography.Text> <Typography.Text ellipsis={true}>{data?.data?.name}</Typography.Text>

View File

@ -905,6 +905,11 @@ const Crontab = () => {
setViewConf(view ? view : null); setViewConf(view ? view : null);
}; };
const [vt] = useVT(
() => ({ scroll: { y: tableScrollHeight } }),
[tableScrollHeight],
);
return ( return (
<PageContainer <PageContainer
className="ql-container-wrapper crontab-wrapper ql-container-wrapper-has-tab" className="ql-container-wrapper crontab-wrapper ql-container-wrapper-has-tab"
@ -1041,6 +1046,7 @@ const Crontab = () => {
rowSelection={rowSelection} rowSelection={rowSelection}
rowClassName={getRowClassName} rowClassName={getRowClassName}
onChange={onPageChange} onChange={onPageChange}
components={isPhone || pageConf.size < 50 ? undefined : vt}
/> />
</div> </div>
<CronLogModal <CronLogModal