feat(Calendar): add close-on-popstate prop

This commit is contained in:
陈嘉涵 2020-01-21 22:52:00 +08:00
parent 57d88bd586
commit 2b82dcc3dd
3 changed files with 4 additions and 0 deletions

View File

@ -225,6 +225,7 @@ Set `poppable` to `false`, the calendar will be displayed directly on the page i
| round | Whether to show round corner | *boolean* | `true` |
| show-mark | Whether to show background month mark | *boolean* | `true` |
| show-confirm | Whether to show confirm button | *boolean* | `true` |
| close-on-popstate `v2.4.4` | Whether to close when popstate | *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` |
| confirm-text | Confirm button text | *string* | `Confirm` |

View File

@ -225,6 +225,7 @@ export default {
| round | 是否显示圆角弹窗 | *boolean* | `true` |
| show-mark | 是否显示月份背景水印 | *boolean* | `true` |
| show-confirm | 是否展示确认按钮 | *boolean* | `true` |
| close-on-popstate `v2.4.4` | 是否在页面回退时自动关闭 | *boolean* | `false` |
| close-on-click-overlay | 是否在点击遮罩层后关闭 | *boolean* | `true` |
| safe-area-inset-bottom | 是否开启底部安全区适配,[详细说明](#/zh-CN/quickstart#di-bu-an-quan-qu-gua-pei) | *boolean* | `true` |
| confirm-text | 确认按钮的文字 | *string* | `确定` |

View File

@ -29,6 +29,7 @@ export default createComponent({
rangePrompt: String,
defaultDate: [Date, Array],
getContainer: [String, Function],
closeOnPopstate: Boolean,
confirmDisabledText: String,
type: {
type: String,
@ -372,6 +373,7 @@ export default createComponent({
round={this.round}
position={this.position}
getContainer={this.getContainer}
closeOnPopstate={this.closeOnPopstate}
closeOnClickOverlay={this.closeOnClickOverlay}
onInput={this.togglePopup}
>