From 803727e2f9e6b6a95f7a105433e374707c974818 Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 20 Jan 2020 16:43:47 +0800 Subject: [PATCH] feat(Calendar): add get-contaienr prop (#5609) --- src/action-sheet/README.md | 2 +- src/calendar/README.md | 1 + src/calendar/README.zh-CN.md | 1 + src/calendar/index.js | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/action-sheet/README.md b/src/action-sheet/README.md index b3cc6d55f..ccff8bdc3 100644 --- a/src/action-sheet/README.md +++ b/src/action-sheet/README.md @@ -136,7 +136,7 @@ export default { | close-on-click-action | Whether to close when click action | _boolean_ | `false` | | 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 action-sheet | _string \| () => Element_ | - | +| get-container | Return the mount node for ActionSheet | _string \| () => Element_ | - | ### Data Structure of Action diff --git a/src/calendar/README.md b/src/calendar/README.md index 0a7798f22..432fde0be 100644 --- a/src/calendar/README.md +++ b/src/calendar/README.md @@ -231,6 +231,7 @@ Set `poppable` to `false`, the calendar will be displayed directly on the page i | confirm-disabled-text | Confirm button text when disabled | *string* | `Confirm` | | max-range`2.4.3` | Number of selectable days | *number* | - | | range-prompt`2.4.3` | Error message when exceeded max range | *string* | `Choose no more than xx days` | +| get-container`2.4.4` | Return the mount node for Calendar | _string \| () => Element_ | - | ### Data Structure of Day diff --git a/src/calendar/README.zh-CN.md b/src/calendar/README.zh-CN.md index 95ca2913f..521831c26 100644 --- a/src/calendar/README.zh-CN.md +++ b/src/calendar/README.zh-CN.md @@ -231,6 +231,7 @@ export default { | confirm-disabled-text | 确认按钮处于禁用状态时的文字 | *string* | `确定` | | max-range`2.4.3` | 日期区间最多可选天数,默认无限制 | *number* | - | | range-prompt`2.4.3` | 选择超过区间范围时的提示文案 | *string* | `选择天数不能超过 xx 天` | +| get-container`2.4.4` | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | *string \| () => Element* | - | ### Day 数据结构 diff --git a/src/calendar/index.js b/src/calendar/index.js index e6b96dc4a..819bedfee 100644 --- a/src/calendar/index.js +++ b/src/calendar/index.js @@ -28,6 +28,7 @@ export default createComponent({ confirmText: String, rangePrompt: String, defaultDate: [Date, Array], + getContainer: [String, Function], confirmDisabledText: String, type: { type: String, @@ -370,6 +371,7 @@ export default createComponent({ value={this.value} round={this.round} position={this.position} + getContainer={this.getContainer} closeOnClickOverlay={this.closeOnClickOverlay} onInput={this.togglePopup} >