@antdp/hooks
Version:
@/antdp-hooks
19 lines • 480 B
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import { useAntdTable } from 'ahooks';
function useTable(service, options) {
var {
tableProps,
search
} = useAntdTable(service, _extends({
defaultPageSize: 20
}, options));
return {
tableProps: _extends({}, tableProps, {
pagination: _extends({}, tableProps.pagination, {
showTotal: total => "\u603B\u5171: " + total + " \u6761"
})
}),
search
};
}
export default useTable;