diff --git a/src/share-sheet/README.md b/src/share-sheet/README.md index c74248b09..8e96e81b5 100644 --- a/src/share-sheet/README.md +++ b/src/share-sheet/README.md @@ -101,6 +101,14 @@ export default { | title | Title | *string* | - | | cancel-text | Cancel button text | *string* | `'Cancel'` | | description | Description | *string* | - | +| duration | Transition duration, unit second | *number \| string* | `0.3` | +| overlay | Whether to show overlay | *boolean* | `true` | +| lock-scroll | Whether to lock background scroll | *boolean* | `true` | +| lazy-render | Whether to lazy render util appeared | *boolean* | `true` | +| 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* | - | ### Data Structure of Option diff --git a/src/share-sheet/README.zh-CN.md b/src/share-sheet/README.zh-CN.md index fb74f140e..2e96bee6d 100644 --- a/src/share-sheet/README.zh-CN.md +++ b/src/share-sheet/README.zh-CN.md @@ -134,6 +134,14 @@ export default { | title | 顶部标题 | *string* | - | | cancel-text | 取消按钮文字 | *string* | `'取消'` | | description | 标题下方的辅助描述文字 | *string* | - | +| duration | 动画时长,单位秒 | *number \| string* | `0.3` | +| overlay | 是否显示遮罩层 | *boolean* | `true` | +| lock-scroll | 是否锁定背景滚动 | *boolean* | `true` | +| lazy-render | 是否在显示弹层时才渲染内容 | *boolean* | `true` | +| 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* | - | ### Option 数据结构 diff --git a/src/share-sheet/index.js b/src/share-sheet/index.js index 2912b3eb2..21c8f857a 100644 --- a/src/share-sheet/index.js +++ b/src/share-sheet/index.js @@ -17,14 +17,27 @@ export default createComponent({ title: String, cancelText: String, description: String, + getContainer: [String, Function], options: { type: Array, default: () => [], }, + overlay: { + type: Boolean, + default: true, + }, + closeOnPopstate: { + type: Boolean, + default: true, + }, safeAreaInsetBottom: { type: Boolean, default: true, }, + closeOnClickOverlay: { + type: Boolean, + default: true, + }, }, methods: { @@ -111,6 +124,13 @@ export default createComponent({ class={bem()} value={this.value} position="bottom" + overlay={this.overlay} + duration={this.duration} + lazyRender={this.lazyRender} + lockScroll={this.lockScroll} + getContainer={this.getContainer} + closeOnPopstate={this.closeOnPopstate} + closeOnClickOverlay={this.closeOnClickOverlay} safeAreaInsetBottom={this.safeAreaInsetBottom} onInput={this.toggle} >