Skip to content

Latest commit

 

History

History
58 lines (34 loc) · 2.61 KB

list.md

File metadata and controls

58 lines (34 loc) · 2.61 KB

<list>

0.4 cn

Summary

A core component which provides the most popular features for using a list of items.

It can provide better experience and performance with smooth scrolling and memory reusing.

Child Components

Notes: The list's subcomponents can only contain cell, header, refresh, loading or fixed-position components. Other kind of components will not be displayed correctly.

  • cell defines the attributes and behavior of the cells that appear in list.

  • header 0.6.1 header which will stick to the top when it reaches the top of the screen.

  • refresh component can be used inside list to add pull down to refresh functionality.

  • loading component can be used inside list to add pull up to loadmore functionality.

  • refresh and loading please check out the refresh-loading.

Attributes

  • loadmoreoffset: <number> the offset distance downwards the bottom of the list to trigger the loadmore event, which is triggered when the list scrolls down near enough to the bottom.

Other attributes please check out the common attributes.

Styles

common styles: check out common styles for components

  • support flexbox related styles
  • support box model related styles
  • support position related styles
  • support opacity, background-color etc.

Events

  • loadmore 0.5: if the list scrolls to bottom, this event will be triggered immediately. You can load the next page of items in this event handler.

common events: check out the common events

API

All cells or cell's subcomponents in list support the scrollToElement API in dom module

Restriction

Nested lists or scrollers within the same direction are not supported. In other words. nested lists/scroller must have different directions.

For example, a vertical list nested in a vertical list or scroller is ** not ** allowed. However, a vertical list nested in a horizontal list or scroller is legal.

Example

see list-basic demo