breaking change: rename get-container to teleport
This commit is contained in:
@@ -123,7 +123,7 @@ export default {
|
||||
| close-on-popstate | Whether to close when popstate | _boolean_ | `true` |
|
||||
| close-on-click-overlay | Whether to close when click overlay | _boolean_ | `true` |
|
||||
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | _boolean_ | `true` |
|
||||
| get-container | Return the mount node for ShareSheet | _string \| () => Element_ | - |
|
||||
| teleport | Return the mount node for ShareSheet | _string \| Element_ | - |
|
||||
|
||||
### Data Structure of Option
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ export default {
|
||||
| close-on-popstate | 是否在页面回退时自动关闭 | _boolean_ | `true` |
|
||||
| close-on-click-overlay | 是否在点击遮罩层后关闭 | _boolean_ | `true` |
|
||||
| safe-area-inset-bottom | 是否开启[底部安全区适配](#/zh-CN/quickstart#di-bu-an-quan-qu-gua-pei) | _boolean_ | `true` |
|
||||
| get-container | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| () => Element_ | - |
|
||||
| teleport | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| Element_ | - |
|
||||
|
||||
### Option 数据结构
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ export default createComponent({
|
||||
...popupSharedProps,
|
||||
title: String,
|
||||
duration: [Number, String],
|
||||
teleport: [String, Object],
|
||||
cancelText: String,
|
||||
description: String,
|
||||
getContainer: [String, Function],
|
||||
options: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
@@ -141,7 +141,7 @@ export default createComponent({
|
||||
duration={this.duration}
|
||||
lazyRender={this.lazyRender}
|
||||
lockScroll={this.lockScroll}
|
||||
getContainer={this.getContainer}
|
||||
teleport={this.teleport}
|
||||
closeOnPopstate={this.closeOnPopstate}
|
||||
closeOnClickOverlay={this.closeOnClickOverlay}
|
||||
safeAreaInsetBottom={this.safeAreaInsetBottom}
|
||||
|
||||
@@ -89,7 +89,7 @@ test('click-overlay event', async () => {
|
||||
const wrapper = mount(ShareSheet, {
|
||||
propsData: {
|
||||
value: true,
|
||||
getContainer: () => root,
|
||||
teleport: root,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user