import { PageContainer } from "@ant-design/pro-components" import { columns } from "./tableConfig" import { useAjax } from "@/Hook/useAjax" import { useState } from "react" import { useModel } from "@umijs/max" import { appList } from "@/services/distributor/appList" import MyProTable from "@/components/MyProTable" const Page: React.FC = () => { let { state, getEnum } = useModel("global") let [key, setKey] = useState(1) let getList = useAjax((params) => appList(params), { type: 'table' }) return setKey(e), }} > headerTitle={"抖音小程序列表"} rowKey={(r) => r.id} search={{ labelWidth: 120, }} scroll={{ x: "auto" }} params={{ appType: key }} request={async (params) => { if (params.appType) { return await getList.run(params) } }} columns={columns({ appType: key })} /> } export default Page