diff --git a/src/dialog/README.md b/src/dialog/README.md index 08482dee2..d5b958c86 100644 --- a/src/dialog/README.md +++ b/src/dialog/README.md @@ -129,6 +129,7 @@ export default { | confirmButtonText | Confirm button text | *string* | `Confirm` | - | | confirmButtonColor | Confirm button color | *string* | `#1989fa` | - | | overlay | Whether to show overlay | *boolean* | `true` | - | +| overlayClass | Custom overlay class | *string* | - | 2.2.7 | | overlayStyle | Custom overlay style | *object* | - | 2.2.7 | | closeOnPopstate | Whether to close when popstate | *boolean* | `false` | 2.0.5 | | closeOnClickOverlay | Whether to close when click overlay | *boolean* | `false` | - | @@ -152,6 +153,7 @@ export default { | confirm-button-text | Confirm button text | *string* | `Confirm` | - | | confirm-button-color | Confirm button color | *string* | `#1989fa` | - | | overlay | Whether to show overlay | *boolean* | `true` | - | +| overlay-class | Custom overlay class | *string* | - | 2.2.7 | | overlay-style | Custom overlay style | *object* | - | 2.2.7 | | close-on-popstate | Whether to close when popstate | *boolean* | `false` | 2.0.5 | | close-on-click-overlay | Whether to close when click overlay | *boolean* | `false` | - | diff --git a/src/dialog/README.zh-CN.md b/src/dialog/README.zh-CN.md index 63356aa6c..a1f408351 100644 --- a/src/dialog/README.zh-CN.md +++ b/src/dialog/README.zh-CN.md @@ -158,6 +158,7 @@ export default { | cancelButtonText | 取消按钮文案 | *string* | `取消` | - | | cancelButtonColor | 取消按钮颜色 | *string* | `#000` | - | | overlay | 是否展示遮罩层 | *boolean* | `true` | - | +| overlayClass | 自定义遮罩层类名 | *string* | - | 2.2.7 | | overlayStyle | 自定义遮罩层样式 | *object* | - | 2.2.7 | | closeOnPopstate | 是否在页面回退时自动关闭 | *boolean* | `false` | 2.0.5 | | closeOnClickOverlay | 是否在点击遮罩层后关闭弹窗 | *boolean* | `false` | - | @@ -183,6 +184,7 @@ export default { | cancel-button-text | 取消按钮文案 | *string* | `取消` | - | | cancel-button-color | 取消按钮颜色 | *string* | `#000` | - | | overlay | 是否展示遮罩层 | *boolean* | `true` | - | +| overlay-class | 自定义遮罩层类名 | *string* | - | 2.2.7 | | overlay-style | 自定义遮罩层样式 | *object* | - | 2.2.7 | | close-on-popstate | 是否在页面回退时自动关闭 | *boolean* | `false` | 2.0.5 | | close-on-click-overlay | 是否在点击遮罩层后关闭弹窗 | *boolean* | `false` | - | diff --git a/src/dialog/index.js b/src/dialog/index.js index 075dade2e..adb40482a 100644 --- a/src/dialog/index.js +++ b/src/dialog/index.js @@ -53,6 +53,7 @@ Dialog.defaultOptions = { lockScroll: true, transition: 'van-dialog-bounce', beforeClose: null, + overlayClass: '', overlayStyle: null, messageAlign: '', getContainer: 'body', diff --git a/types/dialog.d.ts b/types/dialog.d.ts index 3b0c4f167..f413e972a 100644 --- a/types/dialog.d.ts +++ b/types/dialog.d.ts @@ -9,6 +9,7 @@ export type DialogOptions = { lockScroll?: boolean; transition?: string; messageAlign?: string; + overlayClass?: string; overlayStyle?: object; closeOnPopstate?: boolean; cancelButtonText?: string;