mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-21 22:09:16 +08:00
feat(Dialog): add overlay-class prop (#4683)
This commit is contained in:
parent
34a652dc76
commit
4c268ec54c
@ -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` | - |
|
||||||
|
| overlayClass | Custom overlay class | *string* | - | 2.2.7 |
|
||||||
| overlayStyle | Custom overlay style | *object* | - | 2.2.7 |
|
| 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` | - |
|
||||||
@ -152,6 +153,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-class | Custom overlay class | *string* | - | 2.2.7 |
|
||||||
| overlay-style | Custom overlay style | *object* | - | 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-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` | - |
|
||||||
|
@ -158,6 +158,7 @@ export default {
|
|||||||
| cancelButtonText | 取消按钮文案 | *string* | `取消` | - |
|
| cancelButtonText | 取消按钮文案 | *string* | `取消` | - |
|
||||||
| cancelButtonColor | 取消按钮颜色 | *string* | `#000` | - |
|
| cancelButtonColor | 取消按钮颜色 | *string* | `#000` | - |
|
||||||
| overlay | 是否展示遮罩层 | *boolean* | `true` | - |
|
| overlay | 是否展示遮罩层 | *boolean* | `true` | - |
|
||||||
|
| overlayClass | 自定义遮罩层类名 | *string* | - | 2.2.7 |
|
||||||
| overlayStyle | 自定义遮罩层样式 | *object* | - | 2.2.7 |
|
| overlayStyle | 自定义遮罩层样式 | *object* | - | 2.2.7 |
|
||||||
| closeOnPopstate | 是否在页面回退时自动关闭 | *boolean* | `false` | 2.0.5 |
|
| closeOnPopstate | 是否在页面回退时自动关闭 | *boolean* | `false` | 2.0.5 |
|
||||||
| closeOnClickOverlay | 是否在点击遮罩层后关闭弹窗 | *boolean* | `false` | - |
|
| closeOnClickOverlay | 是否在点击遮罩层后关闭弹窗 | *boolean* | `false` | - |
|
||||||
@ -183,6 +184,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-class | 自定义遮罩层类名 | *string* | - | 2.2.7 |
|
||||||
| overlay-style | 自定义遮罩层样式 | *object* | - | 2.2.7 |
|
| 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` | - |
|
||||||
|
@ -53,6 +53,7 @@ Dialog.defaultOptions = {
|
|||||||
lockScroll: true,
|
lockScroll: true,
|
||||||
transition: 'van-dialog-bounce',
|
transition: 'van-dialog-bounce',
|
||||||
beforeClose: null,
|
beforeClose: null,
|
||||||
|
overlayClass: '',
|
||||||
overlayStyle: null,
|
overlayStyle: null,
|
||||||
messageAlign: '',
|
messageAlign: '',
|
||||||
getContainer: 'body',
|
getContainer: 'body',
|
||||||
|
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;
|
||||||
|
overlayClass?: string;
|
||||||
overlayStyle?: object;
|
overlayStyle?: object;
|
||||||
closeOnPopstate?: boolean;
|
closeOnPopstate?: boolean;
|
||||||
cancelButtonText?: string;
|
cancelButtonText?: string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user