diff --git a/src/calendar/README.md b/src/calendar/README.md index dc4b9bc42..469e14ffe 100644 --- a/src/calendar/README.md +++ b/src/calendar/README.md @@ -200,6 +200,7 @@ Set `poppable` to `false`, the calendar will be displayed directly on the page i | poppable | Whether to show the calendar inside a popup | *boolean* | `true` | - | | show-mark | Whether to show background month mark | *boolean* | `true` | - | | show-confirm | Whether to show confirm button | *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` | - | | confirm-text | Confirm button text | *string* | `Confirm` | - | | confirm-disabled-text | Confirm button text when disabled | *string* | `Confirm` | - | diff --git a/src/calendar/README.zh-CN.md b/src/calendar/README.zh-CN.md index 0b2bc4a39..40bbbdfd7 100644 --- a/src/calendar/README.zh-CN.md +++ b/src/calendar/README.zh-CN.md @@ -200,6 +200,7 @@ export default { | poppable | 是否以弹层的形式展示日历 | *boolean* | `true` | - | | show-mark | 是否显示月份背景水印 | *boolean* | `true` | - | | show-confirm | 是否展示确认按钮 | *boolean* | `true` | - | +| 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* | `确定` | - | | confirm-disabled-text | 确认按钮处于禁用状态时的文字 | *string* | `确定` | - | diff --git a/src/calendar/index.js b/src/calendar/index.js index d352e8332..f8603c899 100644 --- a/src/calendar/index.js +++ b/src/calendar/index.js @@ -64,6 +64,10 @@ export default createComponent({ safeAreaInsetBottom: { type: Boolean, default: true + }, + closeOnClickOverlay: { + type: Boolean, + default: true } }, @@ -314,6 +318,7 @@ export default createComponent({ class={bem('popup')} value={this.value} position={this.position} + closeOnClickOverlay={this.closeOnClickOverlay} onInput={this.togglePopup} > {this.genCalendar()}