|
@@ -3,8 +3,13 @@ import {useHandle} from './hooks';
|
|
|
import {Card} from 'antd';
|
|
|
import {Table, TableTools} from '@components';
|
|
|
import {context, pageContext, searchContext} from '../context';
|
|
|
-import {getNoticeList} from '@apis';
|
|
|
-import {useContextSection, useQueryTableList, useSupertube} from '@hooks';
|
|
|
+import {exportNoticeList, getNoticeList} from '@apis';
|
|
|
+import {
|
|
|
+ useContextSection,
|
|
|
+ useQueryTableList,
|
|
|
+ useSupertube,
|
|
|
+ useTableExportEvent,
|
|
|
+} from '@hooks';
|
|
|
import {useBoolean} from 'ahooks';
|
|
|
import AddModal from './modal';
|
|
|
import PutInModal from './put-in-modal';
|
|
@@ -21,6 +26,11 @@ const TableList: FC = function () {
|
|
|
useHandle(refetch);
|
|
|
const [visible, {setTrue, setFalse}] = useBoolean();
|
|
|
const isSuper = useSupertube();
|
|
|
+ const [isExporting, onExport] = useTableExportEvent({
|
|
|
+ pageContext,
|
|
|
+ context,
|
|
|
+ fn: exportNoticeList,
|
|
|
+ });
|
|
|
|
|
|
return (
|
|
|
<>
|
|
@@ -29,6 +39,8 @@ const TableList: FC = function () {
|
|
|
onAdd={isSuper ? setTrue : void 0}
|
|
|
pageContext={pageContext}
|
|
|
searchContext={searchContext}
|
|
|
+ isExporting={isExporting}
|
|
|
+ onExport={onExport}
|
|
|
/>
|
|
|
|
|
|
<Table
|