fix(Canlendar): fix default-date invalid (#4430)

* fix(Canlendar): fix default-date invalid

* fix(Calendar): update doc
This commit is contained in:
nemo-shen 2021-08-26 10:20:18 +08:00 committed by GitHub
parent 0b273fc037
commit ca9ffd8269
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 20 deletions

View File

@ -270,10 +270,10 @@ Page({
| type | 选择类型:<br>`single`表示选择单个日期,<br>`multiple`表示选择多个日期,<br>`range`表示选择日期区间 | _string_ | `single` | | type | 选择类型:<br>`single`表示选择单个日期,<br>`multiple`表示选择多个日期,<br>`range`表示选择日期区间 | _string_ | `single` |
| title | 日历标题 | _string_ | `日期选择` | | title | 日历标题 | _string_ | `日期选择` |
| color | 主题色,对底部按钮和选中日期生效 | _string_ | `#ee0a24` | | color | 主题色,对底部按钮和选中日期生效 | _string_ | `#ee0a24` |
| min-date | 可选择的最小日期 | _number_ | 当前日期 | | min-date | 可选择的最小日期 | _timestamp_ | 当前日期 |
| max-date | 可选择的最大日期 | _number_ | 当前日期的六个月后 | | max-date | 可选择的最大日期 | _timestamp_ | 当前日期的六个月后 |
| default-date | 默认选中的日期,`type``multiple``range`时为数组 | _number \| number[]_ | 今天 | | default-date | 默认选中的日期,`type``multiple``range`时为数组 | _timestamp \| timestamp[]_ | 今天 |
| row-height | 日期行高 | _number \ | string_ | `64` | | row-height | 日期行高 | _number \| string_ | `64` |
| formatter | 日期格式化函数 | _(day: Day) => Day_ | - | | formatter | 日期格式化函数 | _(day: Day) => Day_ | - |
| poppable | 是否以弹层的形式展示日历 | _boolean_ | `true` | | poppable | 是否以弹层的形式展示日历 | _boolean_ | `true` |
| show-mark | 是否显示月份背景水印 | _boolean_ | `true` | | show-mark | 是否显示月份背景水印 | _boolean_ | `true` |

View File

@ -132,7 +132,7 @@ VantComponent({
created() { created() {
this.setData({ this.setData({
currentDate: this.getInitialDate(), currentDate: this.getInitialDate(this.data.defaultDate),
}); });
}, },