Skip to content

Commit

Permalink
update readme & demo
Browse files Browse the repository at this point in the history
  • Loading branch information
yue1123 committed Mar 1, 2021
1 parent 3524681 commit 91c49f5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,15 @@ const a = new ImgPreviewer('body')
| min | 最小缩放比例 | 0.1(10%) |
| max | 最大缩放比例 | 5(500%) |
| step | 滚轮每次滚动变化的比例 | 0.1 |

# 更新图片

一些动态更新图片列表使用

```js
const a = new ImgPreviewer('body', {
scrollbar: true
})
//
a.update()
```
1 change: 1 addition & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
</head>
<body>
<h1>simple demo</h1>
<a href="https://github.com/yue1123/img-previewer">gitHub</a>
<h3>update images</h3>
<button id="add">添加一张</button>
<br />
Expand Down

0 comments on commit 91c49f5

Please sign in to comment.