Skip to content

Commit 34a652d

Browse files
authored
feat(Dialog): add overlay-style prop (youzan#4682)
1 parent bec49f6 commit 34a652d

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

src/dialog/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ export default {
129129
| confirmButtonText | Confirm button text | *string* | `Confirm` | - |
130130
| confirmButtonColor | Confirm button color | *string* | `#1989fa` | - |
131131
| overlay | Whether to show overlay | *boolean* | `true` | - |
132+
| overlayStyle | Custom overlay style | *object* | - | 2.2.7 |
132133
| closeOnPopstate | Whether to close when popstate | *boolean* | `false` | 2.0.5 |
133134
| closeOnClickOverlay | Whether to close when click overlay | *boolean* | `false` | - |
134135
| lockScroll | Whether to lock body scroll | *boolean* | `true` | - |
@@ -151,6 +152,7 @@ export default {
151152
| confirm-button-text | Confirm button text | *string* | `Confirm` | - |
152153
| confirm-button-color | Confirm button color | *string* | `#1989fa` | - |
153154
| overlay | Whether to show overlay | *boolean* | `true` | - |
155+
| overlay-style | Custom overlay style | *object* | - | 2.2.7 |
154156
| close-on-popstate | Whether to close when popstate | *boolean* | `false` | 2.0.5 |
155157
| close-on-click-overlay | Whether to close when click overlay | *boolean* | `false` | - |
156158
| lock-scroll | Whether to lock background scroll | *boolean* | `true` | - |

src/dialog/README.zh-CN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ export default {
158158
| cancelButtonText | 取消按钮文案 | *string* | `取消` | - |
159159
| cancelButtonColor | 取消按钮颜色 | *string* | `#000` | - |
160160
| overlay | 是否展示遮罩层 | *boolean* | `true` | - |
161+
| overlayStyle | 自定义遮罩层样式 | *object* | - | 2.2.7 |
161162
| closeOnPopstate | 是否在页面回退时自动关闭 | *boolean* | `false` | 2.0.5 |
162163
| closeOnClickOverlay | 是否在点击遮罩层后关闭弹窗 | *boolean* | `false` | - |
163164
| lockScroll | 是否锁定背景滚动 | *boolean* | `true` | - |
@@ -182,6 +183,7 @@ export default {
182183
| cancel-button-text | 取消按钮文案 | *string* | `取消` | - |
183184
| cancel-button-color | 取消按钮颜色 | *string* | `#000` | - |
184185
| overlay | 是否展示遮罩层 | *boolean* | `true` | - |
186+
| overlay-style | 自定义遮罩层样式 | *object* | - | 2.2.7 |
185187
| close-on-popstate | 是否在页面回退时自动关闭 | *boolean* | `false` | 2.0.5 |
186188
| close-on-click-overlay | 是否在点击遮罩层后关闭弹窗 | *boolean* | `false` | - |
187189
| lock-scroll | 是否锁定背景滚动 | *boolean* | `true` | - |

src/dialog/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Dialog.defaultOptions = {
5353
lockScroll: true,
5454
transition: 'van-dialog-bounce',
5555
beforeClose: null,
56+
overlayStyle: null,
5657
messageAlign: '',
5758
getContainer: 'body',
5859
cancelButtonText: '',

types/dialog.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export type DialogOptions = {
99
lockScroll?: boolean;
1010
transition?: string;
1111
messageAlign?: string;
12+
overlayStyle?: object;
1213
closeOnPopstate?: boolean;
1314
cancelButtonText?: string;
1415
cancelButtonColor?: string;

0 commit comments

Comments
 (0)