mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-25 08:26:06 +08:00
修复表格初次获取滚动高度
This commit is contained in:
parent
d071e50d62
commit
0842d66c79
|
@ -763,7 +763,9 @@ const Crontab = ({ headerStyle, isPhone }: any) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setPageSize(parseInt(localStorage.getItem('pageSize') || '20'));
|
setPageSize(parseInt(localStorage.getItem('pageSize') || '20'));
|
||||||
const offset = isPhone ? 40 : 0;
|
const offset = isPhone ? 40 : 0;
|
||||||
setTableScrollHeight(getTableScroll() - offset);
|
setTimeout(() => {
|
||||||
|
setTableScrollHeight(getTableScroll() - offset);
|
||||||
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -299,7 +299,9 @@ const Dependence = ({ headerStyle, isPhone, ws }: any) => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const offset = isPhone ? 40 : 0;
|
const offset = isPhone ? 40 : 0;
|
||||||
setTableScrollHeight(getTableScroll({ extraHeight: 87 }) - offset);
|
setTimeout(() => {
|
||||||
|
setTableScrollHeight(getTableScroll({ extraHeight: 87 }) - offset);
|
||||||
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
4
src/pages/env/index.tsx
vendored
4
src/pages/env/index.tsx
vendored
|
@ -438,7 +438,9 @@ const Env = ({ headerStyle, isPhone, theme }: any) => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const offset = isPhone ? 40 : 0;
|
const offset = isPhone ? 40 : 0;
|
||||||
setTableScrollHeight(getTableScroll({ extraHeight: 87 }) - offset);
|
setTimeout(() => {
|
||||||
|
setTableScrollHeight(getTableScroll({ extraHeight: 87 }) - offset);
|
||||||
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user