1.0.3 • Published 8 years ago

tnt-lazy-load v1.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

#tnt-lazy-load npm version

react 图片懒加载组件

#Development npm i && npm test

#Usage

var TntLazyLoad = require('tnt-lazy-load');
var React = require('react');  
var ReactDOM = require('react-dom');  

ReactDOM.render(<TntLazyLoad 
        src={'http://s00.qccr.com/qccr/g00/backend/2017/02/79edf7bfde9cefed.png'}
    /> , document.getElementById('app')); 

#API

##props

| name         | type                  | default | description  |
| offset       | number                | 100     | 触发距离     |
| src          | string                |         | 图片地址     |
| placeholderW | string/number         | 100     | 默认图片宽   |
| placeholderH | string/number         | 100     | 默认图片高   |
| placeholder  | string                |         | 默认图片地址 |
| alt          | string                |         | 图片描述     |
| style        | object                | {}      | 组件容器样式 |
| onChange     | function(val:element) |         | 替换图片回调 |
1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.1

8 years ago