feat(ImagePreview): add closeable prop (#5654)
This commit is contained in:
@@ -35,6 +35,20 @@ ImagePreview({
|
||||
});
|
||||
```
|
||||
|
||||
### Show Close Icon
|
||||
|
||||
After setting the `closeable` attribute, the close icon will be displayed in the upper right corner of the pop-up layer, and the icon can be customized through the `close-icon` attribute, and the icon location can be customized by using the `close-icon-position` attribute
|
||||
|
||||
```js
|
||||
ImagePreview({
|
||||
images: [
|
||||
'https://img.yzcdn.cn/1.jpg',
|
||||
'https://img.yzcdn.cn/2.jpg'
|
||||
],
|
||||
closeable: true
|
||||
});
|
||||
```
|
||||
|
||||
### Async Close
|
||||
|
||||
```js
|
||||
@@ -100,6 +114,9 @@ export default {
|
||||
| lazyLoad | Whether to enable thumb lazy load,should register [Lazyload](#/en-US/lazyload) component | *boolean* | `false` |
|
||||
| maxZoom | Max zoom | *number \| string* | `3` |
|
||||
| minZoom | Min zoom | *number \| string* | `1/3` |
|
||||
| closeable | Whether to show close icon | *boolean* | `false` |
|
||||
| closeIcon | Close icon name | *string* | `clear` |
|
||||
| closeIconPosition | Close icon position,can be set to `top-left` `bottom-left` `bottom-right` | *string* | `top-right` |
|
||||
|
||||
### Props
|
||||
|
||||
@@ -117,6 +134,9 @@ export default {
|
||||
| lazy-load | Whether to enable thumb lazy load,should register [Lazyload](#/en-US/lazyload) component | *boolean* | `false` |
|
||||
| max-zoom | Max zoom | *number \| string* | `3` |
|
||||
| min-zoom | Min zoom | *number \| string* | `1/3` |
|
||||
| closeable | Whether to show close icon | *boolean* | `false` |
|
||||
| close-icon | Close icon name | *string* | `clear` |
|
||||
| close-icon-position | Close icon position,can be set to `top-left` `bottom-left` `bottom-right` | *string* | `top-right` |
|
||||
|
||||
### Events
|
||||
|
||||
|
||||
Reference in New Issue
Block a user