mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(Dialog): add overlay-style prop (#4682)
This commit is contained in:
parent
bec49f691c
commit
34a652dc76
@ -129,6 +129,7 @@ export default {
|
|||||||
| confirmButtonText | Confirm button text | *string* | `Confirm` | - |
|
| confirmButtonText | Confirm button text | *string* | `Confirm` | - |
|
||||||
| confirmButtonColor | Confirm button color | *string* | `#1989fa` | - |
|
| confirmButtonColor | Confirm button color | *string* | `#1989fa` | - |
|
||||||
| overlay | Whether to show overlay | *boolean* | `true` | - |
|
| 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 |
|
| closeOnPopstate | Whether to close when popstate | *boolean* | `false` | 2.0.5 |
|
||||||
| closeOnClickOverlay | Whether to close when click overlay | *boolean* | `false` | - |
|
| closeOnClickOverlay | Whether to close when click overlay | *boolean* | `false` | - |
|
||||||
| lockScroll | Whether to lock body scroll | *boolean* | `true` | - |
|
| lockScroll | Whether to lock body scroll | *boolean* | `true` | - |
|
||||||
@ -151,6 +152,7 @@ export default {
|
|||||||
| confirm-button-text | Confirm button text | *string* | `Confirm` | - |
|
| confirm-button-text | Confirm button text | *string* | `Confirm` | - |
|
||||||
| confirm-button-color | Confirm button color | *string* | `#1989fa` | - |
|
| confirm-button-color | Confirm button color | *string* | `#1989fa` | - |
|
||||||
| overlay | Whether to show overlay | *boolean* | `true` | - |
|
| 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-popstate | Whether to close when popstate | *boolean* | `false` | 2.0.5 |
|
||||||
| close-on-click-overlay | Whether to close when click overlay | *boolean* | `false` | - |
|
| close-on-click-overlay | Whether to close when click overlay | *boolean* | `false` | - |
|
||||||
| lock-scroll | Whether to lock background scroll | *boolean* | `true` | - |
|
| lock-scroll | Whether to lock background scroll | *boolean* | `true` | - |
|
||||||
|
@ -158,6 +158,7 @@ export default {
|
|||||||
| cancelButtonText | 取消按钮文案 | *string* | `取消` | - |
|
| cancelButtonText | 取消按钮文案 | *string* | `取消` | - |
|
||||||
| cancelButtonColor | 取消按钮颜色 | *string* | `#000` | - |
|
| cancelButtonColor | 取消按钮颜色 | *string* | `#000` | - |
|
||||||
| overlay | 是否展示遮罩层 | *boolean* | `true` | - |
|
| overlay | 是否展示遮罩层 | *boolean* | `true` | - |
|
||||||
|
| overlayStyle | 自定义遮罩层样式 | *object* | - | 2.2.7 |
|
||||||
| closeOnPopstate | 是否在页面回退时自动关闭 | *boolean* | `false` | 2.0.5 |
|
| closeOnPopstate | 是否在页面回退时自动关闭 | *boolean* | `false` | 2.0.5 |
|
||||||
| closeOnClickOverlay | 是否在点击遮罩层后关闭弹窗 | *boolean* | `false` | - |
|
| closeOnClickOverlay | 是否在点击遮罩层后关闭弹窗 | *boolean* | `false` | - |
|
||||||
| lockScroll | 是否锁定背景滚动 | *boolean* | `true` | - |
|
| lockScroll | 是否锁定背景滚动 | *boolean* | `true` | - |
|
||||||
@ -182,6 +183,7 @@ export default {
|
|||||||
| cancel-button-text | 取消按钮文案 | *string* | `取消` | - |
|
| cancel-button-text | 取消按钮文案 | *string* | `取消` | - |
|
||||||
| cancel-button-color | 取消按钮颜色 | *string* | `#000` | - |
|
| cancel-button-color | 取消按钮颜色 | *string* | `#000` | - |
|
||||||
| overlay | 是否展示遮罩层 | *boolean* | `true` | - |
|
| overlay | 是否展示遮罩层 | *boolean* | `true` | - |
|
||||||
|
| overlay-style | 自定义遮罩层样式 | *object* | - | 2.2.7 |
|
||||||
| close-on-popstate | 是否在页面回退时自动关闭 | *boolean* | `false` | 2.0.5 |
|
| close-on-popstate | 是否在页面回退时自动关闭 | *boolean* | `false` | 2.0.5 |
|
||||||
| close-on-click-overlay | 是否在点击遮罩层后关闭弹窗 | *boolean* | `false` | - |
|
| close-on-click-overlay | 是否在点击遮罩层后关闭弹窗 | *boolean* | `false` | - |
|
||||||
| lock-scroll | 是否锁定背景滚动 | *boolean* | `true` | - |
|
| lock-scroll | 是否锁定背景滚动 | *boolean* | `true` | - |
|
||||||
|
@ -53,6 +53,7 @@ Dialog.defaultOptions = {
|
|||||||
lockScroll: true,
|
lockScroll: true,
|
||||||
transition: 'van-dialog-bounce',
|
transition: 'van-dialog-bounce',
|
||||||
beforeClose: null,
|
beforeClose: null,
|
||||||
|
overlayStyle: null,
|
||||||
messageAlign: '',
|
messageAlign: '',
|
||||||
getContainer: 'body',
|
getContainer: 'body',
|
||||||
cancelButtonText: '',
|
cancelButtonText: '',
|
||||||
|
1
types/dialog.d.ts
vendored
1
types/dialog.d.ts
vendored
@ -9,6 +9,7 @@ export type DialogOptions = {
|
|||||||
lockScroll?: boolean;
|
lockScroll?: boolean;
|
||||||
transition?: string;
|
transition?: string;
|
||||||
messageAlign?: string;
|
messageAlign?: string;
|
||||||
|
overlayStyle?: object;
|
||||||
closeOnPopstate?: boolean;
|
closeOnPopstate?: boolean;
|
||||||
cancelButtonText?: string;
|
cancelButtonText?: string;
|
||||||
cancelButtonColor?: string;
|
cancelButtonColor?: string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user