mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-05-22 14:39:16 +08:00
[improvement] Popup: support custom style (#598)
This commit is contained in:
parent
265ce6a982
commit
2c11ae3193
@ -46,13 +46,14 @@ Page({
|
|||||||
|
|
||||||
| 参数 | 说明 | 类型 | 默认值 |
|
| 参数 | 说明 | 类型 | 默认值 |
|
||||||
|-----------|-----------|-----------|-------------|
|
|-----------|-----------|-----------|-------------|
|
||||||
| show | 当前组件是否显示 | `Boolean` | `false` |
|
| show | 是否显示弹出层 | `Boolean` | `false` |
|
||||||
|
| z-index | z-index 层级 | `Number` | `100` |
|
||||||
| overlay | 是否显示背景蒙层 | `Boolean` | `true` |
|
| overlay | 是否显示背景蒙层 | `Boolean` | `true` |
|
||||||
| position | 可选值为 `top` `bottom` `right` `left` | `String` | - |
|
| position | 可选值为 `top` `bottom` `right` `left` | `String` | - |
|
||||||
| overlay-style | 自定义蒙层样式 | `String` | `` |
|
|
||||||
| close-on-click-overlay | 点击蒙层是否关闭 Popup | `Boolean` | `true` |
|
|
||||||
| z-index | z-index 层级 | `Number` | `100` |
|
|
||||||
| duration | 动画时长,单位为毫秒 | `Number` | `300` |
|
| duration | 动画时长,单位为毫秒 | `Number` | `300` |
|
||||||
|
| custom-style | 自定义弹出层样式 | `String` | `` |
|
||||||
|
| overlay-style | 自定义背景蒙层样式 | `String` | `` |
|
||||||
|
| close-on-click-overlay | 点击蒙层是否关闭 Popup | `Boolean` | `true` |
|
||||||
|
|
||||||
### Event
|
### Event
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ create({
|
|||||||
|
|
||||||
props: {
|
props: {
|
||||||
transition: String,
|
transition: String,
|
||||||
|
customStyle: String,
|
||||||
overlayStyle: String,
|
overlayStyle: String,
|
||||||
zIndex: {
|
zIndex: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<view
|
<view
|
||||||
wx:if="{{ inited }}"
|
wx:if="{{ inited }}"
|
||||||
class="custom-class van-popup {{ position ? 'van-popup--' + position : '' }}"
|
class="custom-class van-popup {{ position ? 'van-popup--' + position : '' }}"
|
||||||
style="z-index: {{ zIndex }}; animation-name: van-{{ transition || position }}-{{ type }}; animation-duration: {{ duration }}ms; {{ display ? '' : 'display: none;' }}"
|
style="z-index: {{ zIndex }}; animation-name: van-{{ transition || position }}-{{ type }}; animation-duration: {{ duration }}ms; {{ display ? '' : 'display: none;' }}{{ customStyle }}"
|
||||||
bind:animationend="onAnimationEnd"
|
bind:animationend="onAnimationEnd"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user