From 9cbcd93e576e71186a977eeb7c72895e6721e324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Sat, 28 Dec 2019 11:48:58 +0800 Subject: [PATCH] feat(Calendar): add round prop --- src/calendar/README.md | 1 + src/calendar/README.zh-CN.md | 1 + src/calendar/index.js | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/src/calendar/README.md b/src/calendar/README.md index 469e14ffe..0cde92750 100644 --- a/src/calendar/README.md +++ b/src/calendar/README.md @@ -198,6 +198,7 @@ Set `poppable` to `false`, the calendar will be displayed directly on the page i | formatter | Day formatter | *(day: Day) => Day* | - | - | | position | Popup position, can be set to `top` `right` `left` | *string* | `bottom` | - | | poppable | Whether to show the calendar inside a popup | *boolean* | `true` | - | +| 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-click-overlay | Whether to close when click overlay | *boolean* | `true` | - | diff --git a/src/calendar/README.zh-CN.md b/src/calendar/README.zh-CN.md index 40bbbdfd7..c3ce9a000 100644 --- a/src/calendar/README.zh-CN.md +++ b/src/calendar/README.zh-CN.md @@ -198,6 +198,7 @@ export default { | formatter | 日期格式化函数 | *(day: Day) => Day* | - | - | | position | 弹出位置,可选值为 `top` `right` `left` | *string* | `bottom` | - | | poppable | 是否以弹层的形式展示日历 | *boolean* | `true` | - | +| round | 是否显示圆角 | *boolean* | `true` | - | | show-mark | 是否显示月份背景水印 | *boolean* | `true` | - | | show-confirm | 是否展示确认按钮 | *boolean* | `true` | - | | close-on-click-overlay | 是否在点击遮罩层后关闭 | *boolean* | `true` | - | diff --git a/src/calendar/index.js b/src/calendar/index.js index f8603c899..88f793838 100644 --- a/src/calendar/index.js +++ b/src/calendar/index.js @@ -49,6 +49,10 @@ export default createComponent({ type: Number, default: ROW_HEIGHT }, + round: { + type: Boolean, + default: true + }, poppable: { type: Boolean, default: true @@ -317,6 +321,7 @@ export default createComponent({ closeable class={bem('popup')} value={this.value} + round={this.round} position={this.position} closeOnClickOverlay={this.closeOnClickOverlay} onInput={this.togglePopup}