feat(Dialog): add overlay-style prop (#4682)

This commit is contained in:
neverland 2019-10-10 20:49:43 +08:00 committed by GitHub
parent bec49f691c
commit 34a652dc76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 0 deletions

View File

@ -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` | - |
| 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` | - |
| lockScroll | Whether to lock body scroll | *boolean* | `true` | - |
@ -151,6 +152,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-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` | - |
| lock-scroll | Whether to lock background scroll | *boolean* | `true` | - |

View File

@ -158,6 +158,7 @@ export default {
| cancelButtonText | 取消按钮文案 | *string* | `取消` | - |
| cancelButtonColor | 取消按钮颜色 | *string* | `#000` | - |
| overlay | 是否展示遮罩层 | *boolean* | `true` | - |
| overlayStyle | 自定义遮罩层样式 | *object* | - | 2.2.7 |
| closeOnPopstate | 是否在页面回退时自动关闭 | *boolean* | `false` | 2.0.5 |
| closeOnClickOverlay | 是否在点击遮罩层后关闭弹窗 | *boolean* | `false` | - |
| lockScroll | 是否锁定背景滚动 | *boolean* | `true` | - |
@ -182,6 +183,7 @@ export default {
| cancel-button-text | 取消按钮文案 | *string* | `取消` | - |
| cancel-button-color | 取消按钮颜色 | *string* | `#000` | - |
| overlay | 是否展示遮罩层 | *boolean* | `true` | - |
| overlay-style | 自定义遮罩层样式 | *object* | - | 2.2.7 |
| close-on-popstate | 是否在页面回退时自动关闭 | *boolean* | `false` | 2.0.5 |
| close-on-click-overlay | 是否在点击遮罩层后关闭弹窗 | *boolean* | `false` | - |
| lock-scroll | 是否锁定背景滚动 | *boolean* | `true` | - |

View File

@ -53,6 +53,7 @@ Dialog.defaultOptions = {
lockScroll: true,
transition: 'van-dialog-bounce',
beforeClose: null,
overlayStyle: null,
messageAlign: '',
getContainer: 'body',
cancelButtonText: '',

1
types/dialog.d.ts vendored
View File

@ -9,6 +9,7 @@ export type DialogOptions = {
lockScroll?: boolean;
transition?: string;
messageAlign?: string;
overlayStyle?: object;
closeOnPopstate?: boolean;
cancelButtonText?: string;
cancelButtonColor?: string;