Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 860 Bytes

README.md

File metadata and controls

38 lines (29 loc) · 860 Bytes

@alitajs/list-view

移动端的加载更多页面封装,简化业务流程。使用了 @umijs/hooksuseLoadMore

最简 Demo

import LoadMoreListView from '@alitajs/list-view';
import { request } from 'alita';

export async function query(data): Promise<any> {
  return request('/api/list', { data });
}

const IndexPage: FC = () => {
  const renderRow = rowData => <div style={{ height: 500 }}>{rowData.title}</div>;
  return (
    <LoadMoreListView
      requestFunc={query}
      renderRow={renderRow}
      requestParams={{
        abc: '123',
        token: 'alita',
        pageSize: 0,
        offset: 0,
      }}
    />
  );
};

export default IndexPage;

API

更多信息,请查阅官网