mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-05-21 13:59:15 +08:00
[new feature] Dialog: add new prop custom-style
This commit is contained in:
parent
54470a77c8
commit
5a6526922f
@ -134,7 +134,8 @@ Page({
|
|||||||
| message | 内容 | `String` | - |
|
| message | 内容 | `String` | - |
|
||||||
| messageAlign | 内容对齐方式,可选值为`left` `right` | `String` | `center` |
|
| messageAlign | 内容对齐方式,可选值为`left` `right` | `String` | `center` |
|
||||||
| zIndex | z-index 层级 | `Number` | `100` |
|
| zIndex | z-index 层级 | `Number` | `100` |
|
||||||
| className | 自定义类名 | `String` | '' |
|
| className | 自定义类名,dialog在自定义组件内时无效 | `String` | '' |
|
||||||
|
| customStyle | 自定义样式 | `String` | '' |
|
||||||
| selector | 自定义选择器 | `String` | `van-dialog` |
|
| selector | 自定义选择器 | `String` | `van-dialog` |
|
||||||
| showConfirmButton | 是否展示确认按钮 | `Boolean` | `true` |
|
| showConfirmButton | 是否展示确认按钮 | `Boolean` | `true` |
|
||||||
| showCancelButton | 是否展示取消按钮 | `Boolean` | `false` |
|
| showCancelButton | 是否展示取消按钮 | `Boolean` | `false` |
|
||||||
@ -171,7 +172,8 @@ Page({
|
|||||||
| message | 内容 | `String` | - |
|
| message | 内容 | `String` | - |
|
||||||
| message-align | 内容对齐方式,可选值为`left` `right` | `String` | `center` |
|
| message-align | 内容对齐方式,可选值为`left` `right` | `String` | `center` |
|
||||||
| z-index | z-index 层级 | `Number` | `100` |
|
| z-index | z-index 层级 | `Number` | `100` |
|
||||||
| class-name | 自定义类名 | `String` | '' |
|
| class-name | 自定义类名,dialog在自定义组件内时无效 | `String` | '' |
|
||||||
|
| customStyle | 自定义样式 | `String` | '' |
|
||||||
| show-confirm-button | 是否展示确认按钮 | `Boolean` | `true` |
|
| show-confirm-button | 是否展示确认按钮 | `Boolean` | `true` |
|
||||||
| show-cancel-button | 是否展示取消按钮 | `Boolean` | `false` |
|
| show-cancel-button | 是否展示取消按钮 | `Boolean` | `false` |
|
||||||
| confirm-button-text | 确认按钮的文案 | `String` | `确认` |
|
| confirm-button-text | 确认按钮的文案 | `String` | `确认` |
|
||||||
|
@ -12,6 +12,7 @@ type DialogOptions = {
|
|||||||
selector?: string;
|
selector?: string;
|
||||||
ariaLabel?: string;
|
ariaLabel?: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
|
customStyle?: string;
|
||||||
transition?: string;
|
transition?: string;
|
||||||
asyncClose?: boolean;
|
asyncClose?: boolean;
|
||||||
businessId?: number;
|
businessId?: number;
|
||||||
@ -79,6 +80,7 @@ Dialog.defaultOptions = {
|
|||||||
zIndex: 100,
|
zIndex: 100,
|
||||||
overlay: true,
|
overlay: true,
|
||||||
className: '',
|
className: '',
|
||||||
|
customStyle: '',
|
||||||
asyncClose: false,
|
asyncClose: false,
|
||||||
messageAlign: '',
|
messageAlign: '',
|
||||||
transition: 'scale',
|
transition: 'scale',
|
||||||
|
@ -13,6 +13,7 @@ VantComponent({
|
|||||||
message: String,
|
message: String,
|
||||||
useSlot: Boolean,
|
useSlot: Boolean,
|
||||||
className: String,
|
className: String,
|
||||||
|
customStyle: String,
|
||||||
asyncClose: Boolean,
|
asyncClose: Boolean,
|
||||||
messageAlign: String,
|
messageAlign: String,
|
||||||
showCancelButton: Boolean,
|
showCancelButton: Boolean,
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
overlay="{{ overlay }}"
|
overlay="{{ overlay }}"
|
||||||
custom-class="van-dialog {{ className }}"
|
custom-class="van-dialog {{ className }}"
|
||||||
transition="{{ transition }}"
|
transition="{{ transition }}"
|
||||||
|
custom-style="{{ customStyle }}"
|
||||||
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
||||||
bind:close="onClickOverlay"
|
bind:close="onClickOverlay"
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user