[new feature] ImagePreview: add asyncClose prop (#2198)
This commit is contained in:
@@ -32,13 +32,16 @@ ImagePreview({
|
||||
});
|
||||
```
|
||||
|
||||
#### Close Manually
|
||||
#### Async Close
|
||||
|
||||
```javascript
|
||||
const instance = ImagePreview([
|
||||
'https://img.yzcdn.cn/1.jpg',
|
||||
'https://img.yzcdn.cn/2.jpg'
|
||||
]);
|
||||
const instance = ImagePreview({
|
||||
images: [
|
||||
'https://img.yzcdn.cn/1.jpg',
|
||||
'https://img.yzcdn.cn/2.jpg'
|
||||
],
|
||||
asyncClose: true
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
instance.close();
|
||||
@@ -55,6 +58,7 @@ setTimeout(() => {
|
||||
| showIndicators | Whether to show indicators | `Boolean` | `false` |
|
||||
| loop | Whether to enable loop | `Boolean` | `true` |
|
||||
| onClose | Close callback | `Function` | - |
|
||||
| asyncClose | Whether to enable async close | `Boolean` | `false` |
|
||||
|
||||
### onClose Parematers
|
||||
|
||||
|
||||
Reference in New Issue
Block a user