Gotop
Install
$ npm install --save rax-gotop
Import
import GoTop from 'rax-gotop';
default style:
<GoTop />
user defined style:
<GoTop ="click" ="//gtms03.alicdn.com/tps/i3/TB1rrfVJVXXXXalXXXXGEZzGpXX-40-40.png" />
Note: weex environment must be placed in the first position of ScrollView
Props
name | type | default | describe |
---|---|---|---|
name | String | Top | icon text content |
icon | String | default icon | icon URL |
iconWidth | String | 90 | container width |
iconHeight | String | 90 | container height |
borderColor | String | rgba(0, 0, 0, 0.1) | container border color |
bottom | int | 80 | distance from bottom |
onShow | function | function() {} | icon display callback |
onHide | function | function() {} | icon disappear callback |
Example
// demoimport createElement render Component from 'rax';import GoTop from 'rax-gotop';import ScrollView from 'rax-scrollview';import Text from 'rax-text'; { return <ScrollView => <GoTop ="Top" = = ="//gtms03.alicdn.com/tps/i3/TB1rrfVJVXXXXalXXXXGEZzGpXX-40-40.png" /> Array </ScrollView> ; } ;