Function useTableList

  • 表格分页数据请求

    Type Parameters

    • T = any
    • P extends object = any
    • D = any

    Parameters

    Returns {
        handleCurrentChange: ((pageNum) => Promise<void>);
        handleReset: (() => Promise<void>);
        handleSearch: ((pageNum?) => Promise<void>);
        handleSizeChange: ((pageSize) => Promise<void>);
        isLastPage: Ref<boolean>;
        params: Ref<P>;
        tableData: Ref<UnwrapRefSimple<T>[]>;
        tableLoading: Ref<boolean>;
        tableTotal: Ref<number>;
    }

    • handleCurrentChange: ((pageNum) => Promise<void>)
        • (pageNum): Promise<void>
        • 切换页码 刷新列表

          Parameters

          • pageNum: number

          Returns Promise<void>

    • handleReset: (() => Promise<void>)
        • (): Promise<void>
        • 重置查询参数

          Returns Promise<void>

    • handleSearch: ((pageNum?) => Promise<void>)
        • (pageNum?): Promise<void>
        • Parameters

          • Optional pageNum: number

          Returns Promise<void>

    • handleSizeChange: ((pageSize) => Promise<void>)
        • (pageSize): Promise<void>
        • 切换分页大小 刷新列表

          Parameters

          • pageSize: number

          Returns Promise<void>

    • isLastPage: Ref<boolean>
    • params: Ref<P>
    • tableData: Ref<UnwrapRefSimple<T>[]>
    • tableLoading: Ref<boolean>
    • tableTotal: Ref<number>