Skip to content

Commit bd2d86a

Browse files
committed
update
1 parent f57d162 commit bd2d86a

File tree

2 files changed

+25
-215
lines changed

2 files changed

+25
-215
lines changed

LICENSE

Lines changed: 0 additions & 201 deletions
This file was deleted.

README.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,18 @@
77
- 支持设置图片加载时的临界值
88
- 兼容性IE7+
99

10+
## 目录
11+
- [usage](#usage)
12+
- [param](#param)
13+
- [threshold](#threshold)
14+
- [event](#event)
15+
- [container](#container)
16+
- [data_attribute](#data_attribute)
17+
- [apper](#apper)
18+
- [placeholder](#placeholder)
1019

11-
12-
## Examples
13-
20+
- [Notes](#Notes)
21+
## usage
1422
```html
1523
<script>
1624
 // 获取目标对象
@@ -25,16 +33,19 @@
2533
   })
2634
</script>
2735
```
28-
## 主要参数
29-
```js
30-
/**
31-
   * @param {number} threshold     临界值,选填,默认 0
32-
   * @param {string} event 事件类型,选填,默认 'scroll'
33-
   * @param {object} container 容器,选填,默认 window
34-
   * @param {string} 标记名称,选填,默认 'data-original'
35-
   * @param {function} apper 图片即将更换时的回调函数,选填,默认 null
36-
   * @param {string} placeholder 占位图片,选填,默认为一段图片的 base64值
37-
**/
38-
```
36+
## param
37+
### threshold
38+
临界值,选填,默认 0
39+
### event
40+
事件类型,选填,默认 'scroll'
41+
### container
42+
容器,选填,默认 window
43+
### data_attribute
44+
标记名称,选填,默认 'data-original'
45+
### apper
46+
图片即将更换时的回调函数,选填,默认 null
47+
### placeholder
48+
占位图片,选填,默认为一段图片的 base64值
49+
3950
## Notes
4051
- 注意插件接受的参数都为原生 javaScript 对象

0 commit comments

Comments
 (0)