mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 17:54:32 +08:00
修复表格滚动
This commit is contained in:
@@ -29,11 +29,11 @@ import config from '@/utils/config';
|
||||
import { PageContainer } from '@ant-design/pro-layout';
|
||||
import { request } from '@/utils/http';
|
||||
import SubscriptionModal from './modal';
|
||||
import { getTableScroll } from '@/utils/index';
|
||||
import { history, useOutletContext } from '@umijs/max';
|
||||
import './index.less';
|
||||
import SubscriptionLogModal from './logModal';
|
||||
import { SharedContext } from '@/layouts';
|
||||
import useTableScrollHeight from '@/hooks/useTableScrollHeight';
|
||||
|
||||
const { Text, Paragraph } = Typography;
|
||||
const { Search } = Input;
|
||||
@@ -243,11 +243,11 @@ const Subscription = () => {
|
||||
const [searchText, setSearchText] = useState('');
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
const [pageSize, setPageSize] = useState(20);
|
||||
const [tableScrollHeight, setTableScrollHeight] = useState<number>();
|
||||
const [searchValue, setSearchValue] = useState('');
|
||||
const [isLogModalVisible, setIsLogModalVisible] = useState(false);
|
||||
const [logSubscription, setLogSubscription] = useState<any>();
|
||||
const tableRef = useRef<any>();
|
||||
const tableScrollHeight = useTableScrollHeight(tableRef)
|
||||
|
||||
const runSubscription = (record: any, index: number) => {
|
||||
Modal.confirm({
|
||||
@@ -542,12 +542,6 @@ const Subscription = () => {
|
||||
setPageSize(parseInt(localStorage.getItem('pageSize') || '20'));
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (tableRef.current) {
|
||||
setTableScrollHeight(getTableScroll());
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<PageContainer
|
||||
className="ql-container-wrapper subscriptiontab-wrapper"
|
||||
|
||||
Reference in New Issue
Block a user