@alitajs/list-view
TypeScript icon, indicating that this package has built-in type declarations

1.0.6-beta.1 • Public • Published

@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

更多信息,请查阅官网

Package Sidebar

Install

npm i @alitajs/list-view

Weekly Downloads

4

Version

1.0.6-beta.1

License

MIT

Unpacked Size

114 kB

Total Files

26

Last publish

Collaborators

  • pengyh
  • ashoka_j
  • diyc
  • xiaohuoni
  • imhele
  • wangxingkang
  • shawdanon
  • cjy0208
  • sorrycc
  • hang1017
  • hammersjs