Skip to content

Commit

Permalink
feat: modify onload destory time
Browse files Browse the repository at this point in the history
  • Loading branch information
zivyangll committed Sep 23, 2019
1 parent f5f2c30 commit ecb8b32
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $ skeleton -c ./skeleton.config.json
```

注意:
- 骨架图默认在 onload 事件 1s 后销毁
- 骨架图默认在 onload 事件后销毁
- 手动销毁方式:

```js
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ The html file can be used directly, copy the following location:
```

note:
- The skeleton is destroyed by default after the ons event 1s.
- The skeleton is destroyed by default after onload event.
- Manual destruction method:

```js
Expand Down
4 changes: 2 additions & 2 deletions src/insertSkeleton.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ const insertSkeleton = (skeletonImageBase64, options) => {
}
};
// destroy after the onload event 1s by default
// destroy after the onload event by default
window.addEventListener('load', function(){
setTimeout(function(){
window.SKELETON && SKELETON.destroy()
}, 1000);
}, 0);
});
</script>`;

Expand Down

0 comments on commit ecb8b32

Please sign in to comment.