This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

aotoo-mixins-iscroll

1.0.7 • Public • Published

aotoo-mixins-iscroll

mixin iscroll, Integrated the iscroll library to aotoo

Dependencies

Install

// install
npm install aotoo-common
npm install aotoo-mixins-iscroll --save

Usage

require('aotoo-mixins-scroll')

// inject css into head
Aotoo.inject.css( `
  .iscrollBox{
    height: 400px;
    overflow: hidden;
  }
`)

/*
 I. listTest.render() is a jsx  
 
 II. listTest.render(id) will mount jsx into the dom about that id, like React.render(...)  
 
 III. listTest.render(id, callback)  callback will be executed after jsx be mounted into the dom about that id  
*/
const listData = {
  data: [
    {title: '1111'},
    {title: '2222'},
    {title: '1111'},
    {title: '2222'},
    {title: '1111'},
    {title: '2222'},
    {title: '1111'},
    {title: '2222'},
    {title: '1111'},
    {title: '2222'},
    {title: '1111'},
    {title: '2222'},
    {title: <div className="img">abcdefg</div>},
    {title: '2222'},
    {title: '1111'},
    {title: '2222'},
    {title: '3333'} 
  ]
}

const IscrollList = Aotoo.iscroll((
  <div className='iscrollBox'>
    <Aotoo.list data={listData}/>
  </div>
), {
  elements: '.img',
  onscroll: function(lazy, direction){
    console.log('====== 1111');
  },
  onscrollend: function(lazy) {
    console.log('====== 2222');
  }
})

Aotoo.render(<IscrollList />, 'test')

Package Sidebar

Install

npm i aotoo-mixins-iscroll

Weekly Downloads

1

Version

1.0.7

License

MIT

Unpacked Size

16.2 kB

Total Files

4

Last publish

Collaborators

  • webkixi