0.4 cn
A core component which provides the most popular features for using a list of items.
It can provide better experience and performace with smooth scrolling and memory reusing.
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 to refresh functionality.loading
component can be used inside list to add loading view at the bottom of scroller.
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.
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.
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
- support
click
event. Check out common events - support
appear
/disappear
event. Check out common events - support
refresh
event 0.5. If a refresh component is inside scroller, this event will be triggered when the scroller is swiping down. - support
loading
event . If a loading component is inside scroller, this event will be triggered when user scrolling to the bottom.
All cells or cell's subcomponents in list support the scrollToElement
API in dom module
see list-basic demo