0.4 cn
A vertical scroller which can have multiple child components arranged in one column. If total height of its child components is higher then the height of itself, the whole child components are scrollable.
Notes: A <scroller> can be used as a root element or a embed element. The scoll direction of this component is column, and it can't be changed.
It supports all kinds of weex components as its child components.
show-scrollbar: <boolean>true|false. This value determines whether the scrollbar show. The default value istrue.scroll-direction: <string> define scroll direction of component,horizontalorvertical.
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
positionrelated styles - support
opacity,background-coloretc.
common events: check out the common events
- support
clickevent. Check out common events - support
appear/disappearevent. Check out common events
<template>
<scroller>
<div repeat="{{list}}">
<text>{{name}}: ${{price}}</text>
</div>
</scroller>
</template>
<script>
module.exports = {
data: {
list: [
{name: '...', price: 100},
{name: '...', price: 500},
{name: '...', price: 1.5},
...
]
}
}
</script>