mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 19:41:45 +08:00
feat(Calendar、ActionSheet、Dialog、ShareSheet): add root portal prop (#5680)
This commit is contained in:
parent
e2b031c436
commit
3f8cc449d2
@ -166,6 +166,7 @@ Page({
|
||||
| close-on-click-action | 是否在点击选项后关闭 | _boolean_ | `true` |
|
||||
| close-on-click-overlay | 点击遮罩是否关闭菜单 | _boolean_ | `true` |
|
||||
| safe-area-inset-bottom | 是否为 iPhoneX 留出底部安全距离 | _boolean_ | `true` |
|
||||
| root-portal `v1.11.3` | 是否从页面子树中脱离出来,用于解决各种 fixed 失效问题,微信基础库 >= `2.25.2 ` | _boolean_ | `false` |
|
||||
|
||||
### Events
|
||||
|
||||
@ -207,7 +208,7 @@ Page({
|
||||
|
||||
### 外部样式类
|
||||
|
||||
| 类名 | 说明 |
|
||||
| ------------ | -------------- |
|
||||
| custom-class `v1.10.7` | 根节点样式类 |
|
||||
| list-class `v1.10.7` | `actions`容器样式类 |
|
||||
| 类名 | 说明 |
|
||||
| ---------------------- | ------------------- |
|
||||
| custom-class `v1.10.7` | 根节点样式类 |
|
||||
| list-class `v1.10.7` | `actions`容器样式类 |
|
||||
|
@ -38,6 +38,10 @@ VantComponent({
|
||||
type: Boolean,
|
||||
value: true,
|
||||
},
|
||||
rootPortal: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
@ -9,6 +9,7 @@
|
||||
custom-class="van-action-sheet custom-class"
|
||||
safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
|
||||
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
||||
root-portal="{{ rootPortal }}"
|
||||
bind:close="onClickOverlay"
|
||||
>
|
||||
<view wx:if="{{ title }}" class="van-action-sheet__header">
|
||||
|
@ -286,6 +286,7 @@ Page({
|
||||
| confirm-disabled-text | 确认按钮处于禁用状态时的文字 | _string_ | `确定` |
|
||||
| first-day-of-week | 设置周起始日 | _0~6_ | `0` |
|
||||
| readonly `v1.9.1` | 是否为只读状态,只读状态下不能选择日期 | _boolean_ | `false` |
|
||||
| root-portal `v1.11.3` | 是否从页面子树中脱离出来,用于解决各种 fixed 失效问题,微信基础库 >= `2.25.2 ` | _boolean_ | `false` |
|
||||
|
||||
### Poppable Props
|
||||
|
||||
|
@ -136,6 +136,10 @@ VantComponent({
|
||||
value: 0,
|
||||
},
|
||||
readonly: Boolean,
|
||||
rootPortal: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
},
|
||||
|
||||
data: {
|
||||
|
@ -13,6 +13,7 @@
|
||||
closeable="{{ showTitle || showSubtitle }}"
|
||||
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
||||
safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
|
||||
root-portal="{{ rootPortal }}"
|
||||
bind:enter="onOpen"
|
||||
bind:close="onClose"
|
||||
bind:after-enter="onOpened"
|
||||
|
@ -266,6 +266,7 @@ Page({
|
||||
| before-close | 关闭前的回调函数,返回 `false` 可阻止关闭,支持返回 Promise | _(action) => boolean \| Promise\<boolean\>_ | - |
|
||||
| transition | 动画名称,可选值为`fade` | _string_ | `scale` |
|
||||
| confirm-button-open-type | 确认按钮的微信开放能力,具体支持可参考 [微信官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html) | _string_ | - |
|
||||
| root-portal `v1.11.3` | 是否从页面子树中脱离出来,用于解决各种 fixed 失效问题,微信基础库 >= `2.25.2 ` | _boolean_ | `false` |
|
||||
|
||||
### OpenType Props
|
||||
|
||||
|
@ -68,6 +68,10 @@ VantComponent({
|
||||
type: String,
|
||||
value: 'scale',
|
||||
},
|
||||
rootPortal: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
},
|
||||
|
||||
data: {
|
||||
|
@ -9,6 +9,7 @@
|
||||
custom-style="width: {{ utils.addUnit(width) }};{{ customStyle }}"
|
||||
overlay-style="{{ overlayStyle }}"
|
||||
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
||||
root-portal="{{ rootPortal }}"
|
||||
bind:close="onClickOverlay"
|
||||
>
|
||||
<view
|
||||
|
@ -168,6 +168,7 @@ Page({
|
||||
| overlay | 是否显示遮罩层 | _boolean_ | `true` |
|
||||
| close-on-click-overlay | 是否在点击遮罩层后关闭 | _boolean_ | `true` |
|
||||
| safe-area-inset-bottom | 是否开启底部安全区适配 | _boolean_ | `true` |
|
||||
| root-portal `v1.11.3` | 是否从页面子树中脱离出来,用于解决各种 fixed 失效问题,微信基础库 >= `2.25.2 ` | _boolean_ | `false` |
|
||||
|
||||
### Option 数据结构
|
||||
|
||||
|
@ -37,6 +37,10 @@ VantComponent({
|
||||
type: null,
|
||||
value: 300,
|
||||
},
|
||||
rootPortal: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
@ -11,6 +11,7 @@
|
||||
overlay-style="{{ overlayStyle }}"
|
||||
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
||||
safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
|
||||
root-portal="{{ rootPortal }}"
|
||||
bind:close="onClose"
|
||||
bind:click-overlay="onClickOverlay"
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user