diff --git a/packages/action-sheet/README.md b/packages/action-sheet/README.md index d6e91fef..41e5da49 100644 --- a/packages/action-sheet/README.md +++ b/packages/action-sheet/README.md @@ -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`容器样式类 | diff --git a/packages/action-sheet/index.ts b/packages/action-sheet/index.ts index 5ec30930..24bca10b 100644 --- a/packages/action-sheet/index.ts +++ b/packages/action-sheet/index.ts @@ -38,6 +38,10 @@ VantComponent({ type: Boolean, value: true, }, + rootPortal: { + type: Boolean, + value: false, + }, }, methods: { diff --git a/packages/action-sheet/index.wxml b/packages/action-sheet/index.wxml index d59a45d6..6311e334 100644 --- a/packages/action-sheet/index.wxml +++ b/packages/action-sheet/index.wxml @@ -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" > diff --git a/packages/calendar/README.md b/packages/calendar/README.md index de21ae24..a5df374e 100644 --- a/packages/calendar/README.md +++ b/packages/calendar/README.md @@ -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 diff --git a/packages/calendar/index.ts b/packages/calendar/index.ts index c156fb06..ff3c778f 100644 --- a/packages/calendar/index.ts +++ b/packages/calendar/index.ts @@ -136,6 +136,10 @@ VantComponent({ value: 0, }, readonly: Boolean, + rootPortal: { + type: Boolean, + value: false, + }, }, data: { diff --git a/packages/calendar/index.wxml b/packages/calendar/index.wxml index 9667eef9..9d0fc6bf 100644 --- a/packages/calendar/index.wxml +++ b/packages/calendar/index.wxml @@ -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" diff --git a/packages/dialog/README.md b/packages/dialog/README.md index dd9a34fc..b4c8bba9 100644 --- a/packages/dialog/README.md +++ b/packages/dialog/README.md @@ -266,6 +266,7 @@ Page({ | before-close | 关闭前的回调函数,返回 `false` 可阻止关闭,支持返回 Promise | _(action) => boolean \| Promise\_ | - | | 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 diff --git a/packages/dialog/index.ts b/packages/dialog/index.ts index c193f122..5ec1628e 100644 --- a/packages/dialog/index.ts +++ b/packages/dialog/index.ts @@ -68,6 +68,10 @@ VantComponent({ type: String, value: 'scale', }, + rootPortal: { + type: Boolean, + value: false, + }, }, data: { diff --git a/packages/dialog/index.wxml b/packages/dialog/index.wxml index 7cf12d80..a1d8e3cf 100644 --- a/packages/dialog/index.wxml +++ b/packages/dialog/index.wxml @@ -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" > = `2.25.2 ` | _boolean_ | `false` | ### Option 数据结构 diff --git a/packages/share-sheet/index.ts b/packages/share-sheet/index.ts index 029d7246..e8b97dad 100644 --- a/packages/share-sheet/index.ts +++ b/packages/share-sheet/index.ts @@ -37,6 +37,10 @@ VantComponent({ type: null, value: 300, }, + rootPortal: { + type: Boolean, + value: false, + }, }, methods: { diff --git a/packages/share-sheet/index.wxml b/packages/share-sheet/index.wxml index cefc3af4..72a5b253 100644 --- a/packages/share-sheet/index.wxml +++ b/packages/share-sheet/index.wxml @@ -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" >