feat(ImagePreview): add overlayStyle option (#10043)

This commit is contained in:
neverland 2021-12-14 21:01:52 +08:00 committed by GitHub
parent 1d4c4df4fa
commit 9a2acced0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 0 deletions

View File

@ -27,6 +27,7 @@ export default createComponent({
className: null,
closeable: Boolean,
asyncClose: Boolean,
overlayStyle: Object,
showIndicators: Boolean,
images: {
type: Array,

View File

@ -130,6 +130,7 @@ export default {
| closeIcon `v2.5.0` | Close icon name | _string_ | `clear` |
| closeIconPosition `v2.5.0` | Close icon positioncan be set to `top-left` `bottom-left` `bottom-right` | _string_ | `top-right` |
| transition `v2.12.8` | Transition, equivalent to `name` prop of [transition](https://vuejs.org/v2/api/#transition) | _string_ | `van-fade` |
| overlayStyle `v2.12.37` | Custom overlay style | _object_ | - |
| getContainer | Return the mount node for ImagePreview | _string \| () => Element_ | - |
### Props
@ -151,6 +152,7 @@ export default {
| close-icon `v2.5.0` | Close icon name | _string_ | `clear` |
| close-icon-position `v2.5.0` | Close icon positioncan be set to `top-left` `bottom-left` `bottom-right` | _string_ | `top-right` |
| transition `v2.12.8` | Transition, equivalent to `name` prop of [transition](https://vuejs.org/v2/api/#transition) | _string_ | `van-fade` |
| overlay-style `v2.12.37` | Custom overlay style | _object_ | - |
| get-container | Return the mount node for ImagePreview | _string \| () => Element_ | - |
### Events

View File

@ -166,6 +166,7 @@ export default {
| closeIcon `v2.5.0` | 关闭图标名称或图片链接 | _string_ | `clear` |
| closeIconPosition `v2.5.0` | 关闭图标位置,可选值为`top-left`<br>`bottom-left` `bottom-right` | _string_ | `top-right` |
| transition `v2.12.8` | 动画类名,等价于 [transition](https://cn.vuejs.org/v2/api/index.html#transition) 的 `name` 属性 | _string_ | `van-fade` |
| overlayStyle `v2.12.37` | 自定义遮罩层样式 | _object_ | - |
| getContainer | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| () => Element_ | - |
### Props
@ -189,6 +190,7 @@ export default {
| close-icon `v2.5.0` | 关闭图标名称或图片链接 | _string_ | `clear` |
| close-icon-position `v2.5.0` | 关闭图标位置,可选值为`top-left`<br>`bottom-left` `bottom-right` | _string_ | `top-right` |
| transition `v2.12.8` | 动画类名,等价于 [transition](https://cn.vuejs.org/v2/api/index.html#transition) 的 `name` 属性 | _string_ | `van-fade` |
| overlay-style `v2.12.37` | 自定义遮罩层样式 | _object_ | - |
| get-container | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| () => Element_ | - |
### Events

View File

@ -19,6 +19,7 @@ const defaultConfig = {
asyncClose: false,
transition: 'van-fade',
getContainer: 'body',
overlayStyle: null,
startPosition: 0,
swipeDuration: 300,
showIndicators: false,

View File

@ -15,6 +15,7 @@ export type ImagePreviewOptions =
closeIcon?: string;
asyncClose?: boolean;
transition?: string;
overlayStyle?: object;
swipeDuration?: number;
startPosition?: number;
showIndicators?: boolean;