shenwu 5 months ago
parent
commit
f90fe286e3

+ 34 - 0
src/components/MyProTable/index.tsx

@@ -0,0 +1,34 @@
+import 'antd/lib/table/style';
+import 'antd/lib/typography/style';
+import type { ParamsType } from '@ant-design/pro-provider';
+import Summary from 'rc-table/lib/Footer/Summary';
+import React, { useMemo, useState } from 'react';
+import { ProTable, ProTableProps } from '@ant-design/pro-components';
+
+/**
+ * 
+ *ProTable组件外封装了一层传参和ProTable一样,只是可以自己附加一些操作,全局管理一些参数比如table的尺寸
+ * @param props - Table properties
+ */
+const MyProTable = <DataType extends Record<string, any>, Params extends ParamsType = ParamsType, ValueType = "text">(
+    props: ProTableProps<DataType, Params, ValueType>
+): JSX.Element => {
+    const [size,setSize]=useState<"small" | "large" | "middle">(localStorage.getItem("tableSize") as ("small" | "large" | "middle")  || "small")
+    // 尺寸改变设置到本地,全局变动
+    function sizeChangge(size: any) {
+        localStorage.setItem("tableSize", size)
+        setSize(size)
+    }
+    // 组件主体逻辑可以在此编写
+    console.log(size)
+    return <ProTable
+        size={size}//全局默认尺寸假如外面传入会覆盖
+        {...props}
+        onSizeChange={sizeChangge}
+    />
+};
+
+// 将 Summary 属性添加到 CustomTableContainer 上
+MyProTable.Summary = Summary;
+
+export default MyProTable;

+ 3 - 2
src/pages/Distributor/Account/index.tsx

@@ -1,10 +1,11 @@
-import { ActionType, BetaSchemaForm, PageContainer, ProFormInstance, ProTable } from "@ant-design/pro-components"
+import { ActionType, BetaSchemaForm, PageContainer, ProFormInstance } from "@ant-design/pro-components"
 import { columns } from "./tableConfig"
 import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { distributorAccountAdd, distributorAccountList, distributorAccountUpdate } from "@/services/distributor/account"
 import { distributorAccountAdd, distributorAccountList, distributorAccountUpdate } from "@/services/distributor/account"
 import { Button, message } from "antd"
 import { Button, message } from "antd"
 import { useRef, useState } from "react"
 import { useRef, useState } from "react"
 import { PlusCircleOutlined } from "@ant-design/icons"
 import { PlusCircleOutlined } from "@ant-design/icons"
+import MyProTable from "@/components/MyProTable"
 
 
 const Page: React.FC = () => {
 const Page: React.FC = () => {
     const actionRef = useRef<ActionType>();
     const actionRef = useRef<ActionType>();
@@ -30,7 +31,7 @@ const Page: React.FC = () => {
         })
         })
     }
     }
     return <PageContainer>
     return <PageContainer>
-        <ProTable<any, any>
+        <MyProTable<any, any>
             actionRef={actionRef}
             actionRef={actionRef}
             headerTitle={"账号列表"}
             headerTitle={"账号列表"}
             rowKey={(r) => r.id}
             rowKey={(r) => r.id}

+ 5 - 19
src/pages/Distributor/AppList/index.tsx

@@ -1,10 +1,10 @@
-import { PageContainer, ProTable } from "@ant-design/pro-components"
-import { Table } from "antd"
-import { columns, childrenColumns } from "./tableConfig"
+import { PageContainer } from "@ant-design/pro-components"
+import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
-import { useMemo, useState } from "react"
+import { useState } from "react"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
 import { appList } from "@/services/distributor/appList"
 import { appList } from "@/services/distributor/appList"
+import MyProTable from "@/components/MyProTable"
 
 
 const Page: React.FC = () => {
 const Page: React.FC = () => {
     let { state, getEnum } = useModel("global")
     let { state, getEnum } = useModel("global")
@@ -18,7 +18,7 @@ const Page: React.FC = () => {
             onChange: (e) => setKey(e),
             onChange: (e) => setKey(e),
         }}
         }}
     >
     >
-        <ProTable<any, any>
+        <MyProTable<any, any>
             headerTitle={"抖音小程序列表"}
             headerTitle={"抖音小程序列表"}
             rowKey={(r) => r.id}
             rowKey={(r) => r.id}
             search={{
             search={{
@@ -34,20 +34,6 @@ const Page: React.FC = () => {
                 }
                 }
             }}
             }}
             columns={columns({ appType: key })}
             columns={columns({ appType: key })}
-            // expandable={{
-            //     rowExpandable: (record) => record?.appCarrierList?.length > 0,
-            //     expandRowByClick: true,
-            //     expandedRowRender: (record) => {
-            //         return <Table
-            //             columns={childrenColumns}
-            //             dataSource={record.appCarrierList}
-            //             rowKey={(r) => r.id}
-            //             pagination={false}
-            //             size='small'
-            //             bordered
-            //         />
-            //     },
-            // }}
         />
         />
     </PageContainer>
     </PageContainer>
 
 

+ 4 - 17
src/pages/Distributor/AppManage/index.tsx

@@ -1,4 +1,4 @@
-import { ActionType, ModalForm, PageContainer, ProFormCheckbox, ProFormSelect, ProFormText, ProTable } from "@ant-design/pro-components"
+import { ActionType, ModalForm, PageContainer, ProFormCheckbox, ProFormSelect,} from "@ant-design/pro-components"
 import { Button, Drawer, message, Table } from "antd"
 import { Button, Drawer, message, Table } from "antd"
 import { columns, childrenColumns, columnsOpen } from "./tableConfig"
 import { columns, childrenColumns, columnsOpen } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
@@ -6,6 +6,7 @@ import { useMemo, useRef, useState } from "react"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
 import { accountConfig, accountConfigEnabled, accountConfigList, delAccountConfig, manageList } from "@/services/distributor/appManage"
 import { accountConfig, accountConfigEnabled, accountConfigList, delAccountConfig, manageList } from "@/services/distributor/appManage"
 import { distributorAccountAll } from "@/services/distributor/account"
 import { distributorAccountAll } from "@/services/distributor/account"
+import MyProTable from "@/components/MyProTable"
 
 
 const Page: React.FC = () => {
 const Page: React.FC = () => {
     let { state, getEnum } = useModel("global")
     let { state, getEnum } = useModel("global")
@@ -45,7 +46,7 @@ const Page: React.FC = () => {
             onChange: (e) => setKey(e),
             onChange: (e) => setKey(e),
         }}
         }}
     >
     >
-        <ProTable<any, any>
+        <MyProTable<any, any>
             headerTitle={"抖音小程序列表"}
             headerTitle={"抖音小程序列表"}
             rowKey={(r) => r.id}
             rowKey={(r) => r.id}
             search={{
             search={{
@@ -61,20 +62,6 @@ const Page: React.FC = () => {
                 }
                 }
             }}
             }}
             columns={columns({ appType: key, setOpenTalbe })}
             columns={columns({ appType: key, setOpenTalbe })}
-            // expandable={{
-            //     rowExpandable: (record) => record?.appCarrierList?.length > 0,
-            //     expandRowByClick: true,
-            //     expandedRowRender: (record) => {
-            //         return <Table
-            //             columns={childrenColumns}
-            //             dataSource={record.appCarrierList}
-            //             rowKey={(r) => r.id}
-            //             pagination={false}
-            //             size='small'
-            //             bordered
-            //         />
-            //     },
-            // }}
         />
         />
         <Drawer
         <Drawer
             open={!!openTable}
             open={!!openTable}
@@ -92,7 +79,7 @@ const Page: React.FC = () => {
                 })
                 })
             }}>批量新增账号</Button>}
             }}>批量新增账号</Button>}
         >
         >
-            <ProTable
+            <MyProTable
                 actionRef={actionRef}
                 actionRef={actionRef}
                 search={false}
                 search={false}
                 toolBarRender={false}
                 toolBarRender={false}

+ 4 - 3
src/pages/Distributor/CorpManage/index.tsx

@@ -1,10 +1,11 @@
-import { ActionType, PageContainer, ProTable } from "@ant-design/pro-components"
-import { Button, message, Modal, QRCode, Table } from "antd"
+import { ActionType, PageContainer } from "@ant-design/pro-components"
+import { Button, message, Modal, QRCode } from "antd"
 import { columns } from "./tableConfig"
 import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { corpListOfPage, corpPreAuth, corpSyncAll } from "@/services/distributor/corpManage"
 import { corpListOfPage, corpPreAuth, corpSyncAll } from "@/services/distributor/corpManage"
 import { useRef, useState } from "react"
 import { useRef, useState } from "react"
 import { PlusOutlined } from "@ant-design/icons"
 import { PlusOutlined } from "@ant-design/icons"
+import MyProTable from "@/components/MyProTable"
 
 
 const Page: React.FC = () => {
 const Page: React.FC = () => {
     let getList = useAjax((params) => corpListOfPage(params), { type: 'table' })
     let getList = useAjax((params) => corpListOfPage(params), { type: 'table' })
@@ -40,7 +41,7 @@ const Page: React.FC = () => {
         })
         })
     }
     }
     return <PageContainer >
     return <PageContainer >
-        <ProTable<any, any>
+        <MyProTable<any, any>
             actionRef={actionRef}
             actionRef={actionRef}
             headerTitle={"企微列表"}
             headerTitle={"企微列表"}
             rowKey={(r) => r.id}
             rowKey={(r) => r.id}

+ 3 - 2
src/pages/Distributor/DyMiniApp/index.tsx

@@ -1,13 +1,14 @@
 import { miniAppList } from "@/services/distributor/miniApp"
 import { miniAppList } from "@/services/distributor/miniApp"
-import { PageContainer, ProTable } from "@ant-design/pro-components"
+import { PageContainer } from "@ant-design/pro-components"
 import { Table } from "antd"
 import { Table } from "antd"
 import { columns, childrenColumns } from "./tableConfig"
 import { columns, childrenColumns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
+import MyProTable from "@/components/MyProTable"
 
 
 const Page: React.FC = () => {
 const Page: React.FC = () => {
     let getList = useAjax((params) => miniAppList(params), { type: 'table' })
     let getList = useAjax((params) => miniAppList(params), { type: 'table' })
     return <PageContainer>
     return <PageContainer>
-        <ProTable<any, any>
+        <MyProTable<any, any>
             headerTitle={"抖音小程序列表"}
             headerTitle={"抖音小程序列表"}
             rowKey={(r) => r.id}
             rowKey={(r) => r.id}
             search={{
             search={{

+ 3 - 2
src/pages/Distributor/WxMiniApp/index.tsx

@@ -1,13 +1,14 @@
 import { miniAppList } from "@/services/distributor/miniApp"
 import { miniAppList } from "@/services/distributor/miniApp"
-import { PageContainer, ProTable } from "@ant-design/pro-components"
+import { PageContainer } from "@ant-design/pro-components"
 import { Table } from "antd"
 import { Table } from "antd"
 import { columns, childrenColumns } from "./tableConfig"
 import { columns, childrenColumns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
+import MyProTable from "@/components/MyProTable"
 
 
 const Page: React.FC = () => {
 const Page: React.FC = () => {
     let getList = useAjax((params) => miniAppList(params), { type: 'table' })
     let getList = useAjax((params) => miniAppList(params), { type: 'table' })
     return <PageContainer>
     return <PageContainer>
-        <ProTable<any, any>
+        <MyProTable<any, any>
             headerTitle={"微信小程序列表"}
             headerTitle={"微信小程序列表"}
             rowKey={(r) => r.id}
             rowKey={(r) => r.id}
             search={{
             search={{

+ 2 - 2
src/pages/MiniApp/AdBack/index.tsx

@@ -1,8 +1,8 @@
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { appAccountConfig, doAuthOfBUnit, getAppAccountConfig, tencentAdAccountDoAuth, tencentAdAccountToAuth } from "@/services/miniApp/adBack"
 import { appAccountConfig, doAuthOfBUnit, getAppAccountConfig, tencentAdAccountDoAuth, tencentAdAccountToAuth } from "@/services/miniApp/adBack"
-import { BetaSchemaForm, PageContainer, ProCard, ProForm, ProFormInstance, ProFormRadio, ProFormSelect, ProFormText } from "@ant-design/pro-components"
+import { BetaSchemaForm, PageContainer, ProCard,  ProFormInstance} from "@ant-design/pro-components"
 import { history, useModel } from "@umijs/max"
 import { history, useModel } from "@umijs/max"
-import { Button, Divider, List, message, Modal, Radio, Space } from "antd"
+import { Button, message, Modal, Radio, Space } from "antd"
 import { useEffect, useRef, useState } from "react"
 import { useEffect, useRef, useState } from "react"
 import formConfig from "./formConfig"
 import formConfig from "./formConfig"
 import { searchToObj } from "@/utils"
 import { searchToObj } from "@/utils"

+ 3 - 2
src/pages/MiniApp/BookManage/Long/index.tsx

@@ -1,4 +1,4 @@
-import { ActionType, BetaSchemaForm, PageContainer, ProFormInstance, ProTable } from "@ant-design/pro-components"
+import { ActionType, BetaSchemaForm, PageContainer, ProFormInstance } from "@ant-design/pro-components"
 import { columns } from "./tableConfig"
 import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
@@ -9,6 +9,7 @@ import ReadText from "../components/readText"
 import formConfig from "./formConfig"
 import formConfig from "./formConfig"
 import ReadBook from "../components/readBook"
 import ReadBook from "../components/readBook"
 import { ColumnHeightOutlined, EditFilled } from "@ant-design/icons"
 import { ColumnHeightOutlined, EditFilled } from "@ant-design/icons"
+import MyProTable from "@/components/MyProTable"
 const wordCountRanges: any = {
 const wordCountRanges: any = {
     "": { start: null, end: null }, // 全部
     "": { start: null, end: null }, // 全部
     "0-2": { start: 0, end: 2 * 10000 },
     "0-2": { start: 0, end: 2 * 10000 },
@@ -166,7 +167,7 @@ const Page: React.FC = (props: Props) => {
     return <PageContainer title={false}
     return <PageContainer title={false}
         tabProps={{ type: 'card' }}
         tabProps={{ type: 'card' }}
     >
     >
-        <ProTable<any, any>
+        <MyProTable<any, any>
             // params={publicData}
             // params={publicData}
             actionRef={actionRef}
             actionRef={actionRef}
             headerTitle={"小说列表"}
             headerTitle={"小说列表"}

+ 3 - 2
src/pages/MiniApp/BookManage/Short/index.tsx

@@ -1,4 +1,4 @@
-import { ActionType, BetaSchemaForm, PageContainer, ProFormInstance, ProTable } from "@ant-design/pro-components"
+import { ActionType, BetaSchemaForm, PageContainer, ProFormInstance } from "@ant-design/pro-components"
 import { columns } from "./tableConfig"
 import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
@@ -8,6 +8,7 @@ import { Button, Card, Drawer, message, Popconfirm, Space, Tag } from "antd"
 import ReadText from "../components/readText"
 import ReadText from "../components/readText"
 import formConfig from "./formConfig"
 import formConfig from "./formConfig"
 import { ColumnHeightOutlined, EditFilled } from "@ant-design/icons"
 import { ColumnHeightOutlined, EditFilled } from "@ant-design/icons"
+import MyProTable from "@/components/MyProTable"
 const wordCountRanges: any = {
 const wordCountRanges: any = {
     "": { start: null, end: null }, // 全部
     "": { start: null, end: null }, // 全部
     "0-2": { start: 0, end: 2 * 10000 },
     "0-2": { start: 0, end: 2 * 10000 },
@@ -175,7 +176,7 @@ const Page: React.FC = (props: Props) => {
         tabProps={{ type: 'card' }}
         tabProps={{ type: 'card' }}
         loading={globaleConfig?.loading}
         loading={globaleConfig?.loading}
     >
     >
-        <ProTable<any, any>
+        <MyProTable<any, any>
             actionRef={actionRef}
             actionRef={actionRef}
             headerTitle={"小说列表"}
             headerTitle={"小说列表"}
             rowKey={(r) => r.bookId}
             rowKey={(r) => r.bookId}

+ 1 - 1
src/pages/MiniApp/BookManage/components/readBook/index.tsx

@@ -1,5 +1,5 @@
 import { Button, Col, Row, Image, Spin, Space, Drawer, Empty } from "antd";
 import { Button, Col, Row, Image, Spin, Space, Drawer, Empty } from "antd";
-import { JSXElementConstructor, Key, ReactElement, ReactFragment, ReactPortal, useEffect, useMemo, useRef, useState } from "react";
+import { useEffect,  useRef, useState } from "react";
 import { MyIcon } from "@/global";
 import { MyIcon } from "@/global";
 import { useToken } from "@ant-design/pro-components";
 import { useToken } from "@ant-design/pro-components";
 function ReadBook(props: { next: (listData: { id: number }) => Promise<any>, listData: any }) {
 function ReadBook(props: { next: (listData: { id: number }) => Promise<any>, listData: any }) {

+ 3 - 2
src/pages/MiniApp/Consume/index.tsx

@@ -1,9 +1,10 @@
-import { PageContainer, ProTable } from "@ant-design/pro-components"
+import { PageContainer } from "@ant-design/pro-components"
 import { columns } from "./tableConfig"
 import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { shortBookCoinList, longBookCoinList } from "@/services/miniApp/consume"
 import { shortBookCoinList, longBookCoinList } from "@/services/miniApp/consume"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
 import { useMemo } from "react"
 import { useMemo } from "react"
+import MyProTable from "@/components/MyProTable"
 
 
 const Page: React.FC = () => {
 const Page: React.FC = () => {
     let { initialState } = useModel("@@initialState")
     let { initialState } = useModel("@@initialState")
@@ -21,7 +22,7 @@ const Page: React.FC = () => {
     return <PageContainer
     return <PageContainer
         tabProps={{ type: 'card' }}
         tabProps={{ type: 'card' }}
     >
     >
-        <ProTable<any, any>
+        <MyProTable<any, any>
             params={{
             params={{
                 appId: initialState?.selectApp?.id || "",
                 appId: initialState?.selectApp?.id || "",
                 distributorId: initialState?.currentUser?.distributorId,
                 distributorId: initialState?.currentUser?.distributorId,

+ 3 - 2
src/pages/MiniApp/EmsCnpl/Users/index.tsx

@@ -1,8 +1,9 @@
-import { PageContainer, ProTable } from "@ant-design/pro-components"
+import { PageContainer } from "@ant-design/pro-components"
 import { columns } from "./tableConfig"
 import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
 import { listOfPage } from "@/services/miniApp/emsCnpl"
 import { listOfPage } from "@/services/miniApp/emsCnpl"
+import MyProTable from "@/components/MyProTable"
 
 
 const Page: React.FC = () => {
 const Page: React.FC = () => {
     let { initialState } = useModel("@@initialState")
     let { initialState } = useModel("@@initialState")
@@ -10,7 +11,7 @@ const Page: React.FC = () => {
     return <PageContainer
     return <PageContainer
         title={false}
         title={false}
     >
     >
-        <ProTable<any, any>
+        <MyProTable<any, any>
           scroll={{ x: 'max-content' }}
           scroll={{ x: 'max-content' }}
             params={{
             params={{
                 appId: initialState?.selectApp?.id || "",
                 appId: initialState?.selectApp?.id || "",

+ 4 - 3
src/pages/MiniApp/EntWeChat/Auth/index.tsx

@@ -1,4 +1,4 @@
-import { ActionType, PageContainer, ProTable } from "@ant-design/pro-components"
+import { ActionType, PageContainer } from "@ant-design/pro-components"
 import { columns } from "./tableConfig"
 import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
@@ -6,6 +6,7 @@ import { configUser, getAllAvailableKfs, getAllBindKfs, revoke } from "@/service
 import { Button, message, Modal, Space, Tag } from "antd"
 import { Button, message, Modal, Space, Tag } from "antd"
 import { PlusOutlined } from "@ant-design/icons"
 import { PlusOutlined } from "@ant-design/icons"
 import { useRef, useState } from "react"
 import { useRef, useState } from "react"
+import MyProTable from "@/components/MyProTable"
 
 
 const Page: React.FC = () => {
 const Page: React.FC = () => {
     let { initialState } = useModel("@@initialState")
     let { initialState } = useModel("@@initialState")
@@ -55,7 +56,7 @@ const Page: React.FC = () => {
     return <PageContainer
     return <PageContainer
         title={false}
         title={false}
     >
     >
-        <ProTable<any, any>
+        <MyProTable<any, any>
             actionRef={actionRef}
             actionRef={actionRef}
             scroll={{ x: true }}
             scroll={{ x: true }}
             toolBarRender={() => [
             toolBarRender={() => [
@@ -80,7 +81,7 @@ const Page: React.FC = () => {
             loading={ConfigUser?.loading}
             loading={ConfigUser?.loading}
             destroyOnClose
             destroyOnClose
         >
         >
-            <ProTable<any, any>
+            <MyProTable<any, any>
                 scroll={{ x: true, y: 600 }}
                 scroll={{ x: true, y: 600 }}
                 params={{
                 params={{
                     appId: initialState?.selectApp?.id || "",
                     appId: initialState?.selectApp?.id || "",

+ 3 - 2
src/pages/MiniApp/EntWeChat/Users/index.tsx

@@ -1,9 +1,10 @@
-import { PageContainer, ProTable } from "@ant-design/pro-components"
+import { PageContainer } from "@ant-design/pro-components"
 import { columns } from "./tableConfig"
 import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
 import { getAllKfs, getCustoms } from "@/services/miniApp/entWeChat"
 import { getAllKfs, getCustoms } from "@/services/miniApp/entWeChat"
 import { useEffect } from "react"
 import { useEffect } from "react"
+import MyProTable from "@/components/MyProTable"
 
 
 const Page: React.FC = () => {
 const Page: React.FC = () => {
     let { initialState } = useModel("@@initialState")
     let { initialState } = useModel("@@initialState")
@@ -18,7 +19,7 @@ const Page: React.FC = () => {
     },[])
     },[])
     return <PageContainer title={false}
     return <PageContainer title={false}
     >
     >
-        <ProTable<any, any>
+        <MyProTable<any, any>
           scroll={{ x: 'max-content' }}
           scroll={{ x: 'max-content' }}
             params={publicData}
             params={publicData}
             headerTitle={"企微用户列表"}
             headerTitle={"企微用户列表"}

+ 3 - 2
src/pages/MiniApp/Extend/Book/index.tsx

@@ -1,4 +1,4 @@
-import { ActionType, PageContainer, ProTable } from "@ant-design/pro-components"
+import {  PageContainer } from "@ant-design/pro-components"
 import { columns } from "./tableConfig"
 import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { history, useModel } from "@umijs/max"
 import { history, useModel } from "@umijs/max"
@@ -6,6 +6,7 @@ import { Button } from "antd"
 import { PlusCircleOutlined } from "@ant-design/icons"
 import { PlusCircleOutlined } from "@ant-design/icons"
 import { listOfPage } from "@/services/miniApp/extend"
 import { listOfPage } from "@/services/miniApp/extend"
 import { useEffect, useRef } from "react"
 import { useEffect, useRef } from "react"
+import MyProTable from "@/components/MyProTable"
 type Props = {
 type Props = {
     isModal?: boolean
     isModal?: boolean
     value?: any
     value?: any
@@ -27,7 +28,7 @@ const Page: React.FC<Props> = (props) => {
     return <PageContainer title={false}
     return <PageContainer title={false}
         header={isModal ? { breadcrumb: {} } : {}}
         header={isModal ? { breadcrumb: {} } : {}}
     >
     >
-        <ProTable<any, any>
+        <MyProTable<any, any>
             scroll={{ x: true }}
             scroll={{ x: true }}
             toolBarRender={() => {
             toolBarRender={() => {
                 return !isModal ? [
                 return !isModal ? [

+ 3 - 2
src/pages/MiniApp/Extend/Page/index.tsx

@@ -1,10 +1,11 @@
-import { ActionType, PageContainer, ProTable } from "@ant-design/pro-components"
+import { ActionType, PageContainer } from "@ant-design/pro-components"
 import { columns } from "./tableConfig"
 import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
 import PageExtend from "./extend"
 import PageExtend from "./extend"
 import { useEffect, useRef } from "react"
 import { useEffect, useRef } from "react"
 import { listOfPage } from "@/services/miniApp/extend"
 import { listOfPage } from "@/services/miniApp/extend"
+import MyProTable from "@/components/MyProTable"
 type Props = {
 type Props = {
     isModal?: boolean
     isModal?: boolean
     value?: any
     value?: any
@@ -27,7 +28,7 @@ const Page: React.FC<Props> = (props) => {
     return <PageContainer title={false}
     return <PageContainer title={false}
         header={isModal ? { breadcrumb: {} } : {}}
         header={isModal ? { breadcrumb: {} } : {}}
     >
     >
-        <ProTable<any, any>
+        <MyProTable<any, any>
             scroll={{ x: true }}
             scroll={{ x: true }}
             actionRef={actionRef}
             actionRef={actionRef}
             toolBarRender={() => {
             toolBarRender={() => {

+ 3 - 2
src/pages/MiniApp/MiniAppUser/WeChat/index.tsx

@@ -1,10 +1,11 @@
-import { ActionType, PageContainer, ProTable } from "@ant-design/pro-components"
+import { ActionType, PageContainer } from "@ant-design/pro-components"
 import { columns } from "./tableConfig"
 import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
 import { wechatMiniappUserDel, wechatMiniappUserListOfPage, wechatMiniappUserUpdateEnabled } from "@/services/miniApp/miniAppUser/weChat"
 import { wechatMiniappUserDel, wechatMiniappUserListOfPage, wechatMiniappUserUpdateEnabled } from "@/services/miniApp/miniAppUser/weChat"
 import { useCallback, useRef } from "react"
 import { useCallback, useRef } from "react"
 import { message } from "antd"
 import { message } from "antd"
+import MyProTable from "@/components/MyProTable"
 
 
 const Page: React.FC = () => {
 const Page: React.FC = () => {
     let { initialState } = useModel("@@initialState")
     let { initialState } = useModel("@@initialState")
@@ -34,7 +35,7 @@ const Page: React.FC = () => {
     }, [])
     }, [])
     return <PageContainer title={false}
     return <PageContainer title={false}
     >
     >
-        <ProTable<any, any>
+        <MyProTable<any, any>
             actionRef={actionRef}
             actionRef={actionRef}
             scroll={{ x: true }}
             scroll={{ x: true }}
             params={{
             params={{

+ 4 - 3
src/pages/MiniApp/MiniAppUser/bookList/index.tsx

@@ -1,10 +1,11 @@
-import { ActionType, ProTable } from "@ant-design/pro-components"
+import { ActionType } from "@ant-design/pro-components"
 import { columns } from "./tableConfig"
 import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import {  useRef, useState } from "react"
 import {  useRef, useState } from "react"
-import { Button, Drawer, Modal } from "antd"
+import { Button, Modal } from "antd"
 import { shelfLisOfPage } from "@/services/miniApp/miniAppUser"
 import { shelfLisOfPage } from "@/services/miniApp/miniAppUser"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
+import MyProTable from "@/components/MyProTable"
 type Props={
 type Props={
     data: {
     data: {
         id: number
         id: number
@@ -29,7 +30,7 @@ const Page: React.FC<Props> = (props) => {
             width={"50%"}
             width={"50%"}
             destroyOnClose
             destroyOnClose
         >
         >
-            <ProTable<any, any>
+            <MyProTable<any, any>
                 actionRef={actionRef}
                 actionRef={actionRef}
                 scroll={{ x: true ,y:'50vh'}}
                 scroll={{ x: true ,y:'50vh'}}
                 headerTitle={false}
                 headerTitle={false}

+ 3 - 2
src/pages/MiniApp/MiniAppUser/loginList/index.tsx

@@ -1,10 +1,11 @@
-import { ActionType, ProTable } from "@ant-design/pro-components"
+import { ActionType } from "@ant-design/pro-components"
 import { columns } from "./tableConfig"
 import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { useRef, useState } from "react"
 import { useRef, useState } from "react"
 import { Button, Modal } from "antd"
 import { Button, Modal } from "antd"
 import { loginListOfPage } from "@/services/miniApp/miniAppUser"
 import { loginListOfPage } from "@/services/miniApp/miniAppUser"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
+import MyProTable from "@/components/MyProTable"
 type Props = {
 type Props = {
     data: {
     data: {
         id: number
         id: number
@@ -29,7 +30,7 @@ const Page: React.FC<Props> = (props) => {
             width={"50%"}
             width={"50%"}
             destroyOnClose
             destroyOnClose
         >
         >
-            <ProTable<any, any>
+            <MyProTable<any, any>
                  actionRef={actionRef}
                  actionRef={actionRef}
                  scroll={{ x: true ,y:'50vh'}}
                  scroll={{ x: true ,y:'50vh'}}
                  headerTitle={false}
                  headerTitle={false}

+ 3 - 2
src/pages/MiniApp/PayLog/Long/index.tsx

@@ -1,9 +1,10 @@
-import { PageContainer, ProTable } from "@ant-design/pro-components"
+import { PageContainer } from "@ant-design/pro-components"
 import { columns } from "./tableConfig"
 import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
 import { longBookOrderList } from "@/services/miniApp/payLog"
 import { longBookOrderList } from "@/services/miniApp/payLog"
 import { useCallback } from "react"
 import { useCallback } from "react"
+import MyProTable from "@/components/MyProTable"
 
 
 const Page: React.FC = () => {
 const Page: React.FC = () => {
     let { initialState } = useModel("@@initialState")
     let { initialState } = useModel("@@initialState")
@@ -17,7 +18,7 @@ const Page: React.FC = () => {
     }, [])
     }, [])
     return <PageContainer title={false}
     return <PageContainer title={false}
     >
     >
-        <ProTable<any, any>
+        <MyProTable<any, any>
             scroll={{ x: 'max-content' }}
             scroll={{ x: 'max-content' }}
             params={{
             params={{
                 appId: initialState?.selectApp?.id || "",
                 appId: initialState?.selectApp?.id || "",

+ 2 - 2
src/pages/MiniApp/PayLog/Short/index.tsx

@@ -4,6 +4,7 @@ import { useAjax } from "@/Hook/useAjax"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
 import { shortBookOrderList, shortBookOrderReportOrder } from "@/services/miniApp/payLog"
 import { shortBookOrderList, shortBookOrderReportOrder } from "@/services/miniApp/payLog"
 import { useCallback, useRef } from "react"
 import { useCallback, useRef } from "react"
+import MyProTable from "@/components/MyProTable"
 
 
 const Page: React.FC = () => {
 const Page: React.FC = () => {
     let { initialState } = useModel("@@initialState")
     let { initialState } = useModel("@@initialState")
@@ -19,7 +20,7 @@ const Page: React.FC = () => {
     }, [])
     }, [])
     return <PageContainer title={false}
     return <PageContainer title={false}
     >
     >
-        <ProTable<any, any>
+        <MyProTable
             actionRef={actionRef}
             actionRef={actionRef}
             scroll={{ x: 'max-content' }}
             scroll={{ x: 'max-content' }}
             loading={getList?.loading || ShortBookOrderReportOrder?.loading}
             loading={getList?.loading || ShortBookOrderReportOrder?.loading}
@@ -37,7 +38,6 @@ const Page: React.FC = () => {
                 return await getList.run(params)
                 return await getList.run(params)
             }}
             }}
             columns={columns(submit)}
             columns={columns(submit)}
-        // bordered
         />
         />
     </PageContainer>
     </PageContainer>
 
 

+ 3 - 2
src/pages/MiniApp/ReadLog/Long/index.tsx

@@ -1,15 +1,16 @@
-import { PageContainer, ProTable } from "@ant-design/pro-components"
+import { PageContainer } from "@ant-design/pro-components"
 import { columns } from "./tableConfig"
 import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
 import { longBookReadLogList } from "@/services/miniApp/readLog"
 import { longBookReadLogList } from "@/services/miniApp/readLog"
+import MyProTable from "@/components/MyProTable"
 
 
 const Page: React.FC = () => {
 const Page: React.FC = () => {
     let { initialState } = useModel("@@initialState")
     let { initialState } = useModel("@@initialState")
     let getList = useAjax((params) => longBookReadLogList(params), { type: 'table' })
     let getList = useAjax((params) => longBookReadLogList(params), { type: 'table' })
     return <PageContainer title={false}
     return <PageContainer title={false}
     >
     >
-        <ProTable<any, any>
+        <MyProTable<any, any>
           scroll={{ x: 'max-content' }}
           scroll={{ x: 'max-content' }}
             params={{
             params={{
                 appId: initialState?.selectApp?.id || "",
                 appId: initialState?.selectApp?.id || "",

+ 3 - 2
src/pages/MiniApp/ReadLog/Short/index.tsx

@@ -1,8 +1,9 @@
-import { PageContainer, ProTable } from "@ant-design/pro-components"
+import { PageContainer } from "@ant-design/pro-components"
 import { columns } from "./tableConfig"
 import { columns } from "./tableConfig"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
 import { useModel } from "@umijs/max"
 import { useModel } from "@umijs/max"
 import { shortBookReadLogList } from "@/services/miniApp/readLog"
 import { shortBookReadLogList } from "@/services/miniApp/readLog"
+import MyProTable from "@/components/MyProTable"
 
 
 const Page: React.FC = () => {
 const Page: React.FC = () => {
     let { initialState } = useModel("@@initialState")
     let { initialState } = useModel("@@initialState")
@@ -10,7 +11,7 @@ const Page: React.FC = () => {
     return <PageContainer
     return <PageContainer
         title={false}
         title={false}
     >
     >
-        <ProTable<any, any>
+        <MyProTable<any, any>
           scroll={{ x: 'max-content' }}
           scroll={{ x: 'max-content' }}
             params={{
             params={{
                 appId: initialState?.selectApp?.id || "",
                 appId: initialState?.selectApp?.id || "",