feat(Calendar): support select date range

This commit is contained in:
陈嘉涵
2019-12-26 19:59:08 +08:00
committed by neverland
parent c447152be9
commit 0db1a03996
8 changed files with 365 additions and 125 deletions
+10 -3
View File
@@ -1,5 +1,9 @@
# Calendar 日历
### 介绍
日历组件可以用于选择日期或日期区间,通常与 [弹出层](#/zh-CN/popup) 组件配合使用
### 引入
``` javascript
@@ -11,7 +15,7 @@ Vue.use(Calendar);
## 代码演示
### 基础用法
### 选择单个日期
```html
<van-calendar />
@@ -26,8 +30,10 @@ Vue.use(Calendar);
| v-model | 选中的日期 | `Date` | - | - |
| type | 选择类型,`single`为选择单日,`range`为选择日期区间 | `string` | `single` | - |
| title | 日历标题 | `string` | - | - |
| min-date | 最小日期 | `Date` | 当前时间 | - |
| max-date | 最大日期 | `Date` | 当前时间的六个月后 | - |
| min-date | 最小日期 | `Date` | 当前日期 | - |
| max-date | 最大日期 | `Date` | 当前日期的六个月后 | - |
| confirm-text | 选择日期区间时,确认按钮的文字 | `string` | `确定` | - |
| confirm-disabled-text | 选择日期区间时,确认按钮处于禁用状态时的文字 | `string` | `确定` | - |
### Events
@@ -39,6 +45,7 @@ Vue.use(Calendar);
| 名称 | 说明 |
|------|------|
| title | 自定义标题 |
### 方法