mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(Calendar): row-height、max-range can be string type
This commit is contained in:
parent
5f253aa888
commit
086e910afd
@ -218,7 +218,7 @@ Set `poppable` to `false`, the calendar will be displayed directly on the page i
|
||||
| min-date | Min date | *Date* | Today |
|
||||
| max-date | Max date | *Date* | Six months after the today |
|
||||
| default-date | Default selected date | *Date \| Date[]* | Today |
|
||||
| row-height | Row height | *number* | `64` |
|
||||
| row-height | Row height | *string \| number* | `64` |
|
||||
| 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` |
|
||||
@ -230,7 +230,7 @@ Set `poppable` to `false`, the calendar will be displayed directly on the page i
|
||||
| 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` |
|
||||
| max-range `v2.4.3` | Number of selectable days | *number* | - |
|
||||
| max-range `v2.4.3` | Number of selectable days | *string \| number* | - |
|
||||
| range-prompt `v2.4.3` | Error message when exceeded max range | *string* | `Choose no more than xx days` |
|
||||
| get-container `v2.4.4` | Return the mount node for Calendar | _string \| () => Element_ | - |
|
||||
|
||||
|
@ -218,7 +218,7 @@ export default {
|
||||
| min-date | 最小日期 | *Date* | 当前日期 |
|
||||
| max-date | 最大日期 | *Date* | 当前日期的六个月后 |
|
||||
| default-date | 默认选中的日期 | *Date \| Date[]* | 今天 |
|
||||
| row-height | 日期行高 | *number* | `64` |
|
||||
| row-height | 日期行高 | *string \| number* | `64` |
|
||||
| formatter | 日期格式化函数 | *(day: Day) => Day* | - |
|
||||
| position | 弹出位置,可选值为 `top` `right` `left` | *string* | `bottom` |
|
||||
| poppable | 是否以弹层的形式展示日历 | *boolean* | `true` |
|
||||
@ -230,7 +230,7 @@ export default {
|
||||
| safe-area-inset-bottom | 是否开启 [底部安全区适配](#/zh-CN/quickstart#di-bu-an-quan-qu-gua-pei) | *boolean* | `true` |
|
||||
| confirm-text | 确认按钮的文字 | *string* | `确定` |
|
||||
| confirm-disabled-text | 确认按钮处于禁用状态时的文字 | *string* | `确定` |
|
||||
| max-range `v2.4.3` | 日期区间最多可选天数,默认无限制 | *number* | - |
|
||||
| max-range `v2.4.3` | 日期区间最多可选天数,默认无限制 | *string \| number* | - |
|
||||
| range-prompt `v2.4.3` | 选择超过区间范围时的提示文案 | *string* | `选择天数不能超过 xx 天` |
|
||||
| get-container `v2.4.4` | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | *string \| () => Element* | - |
|
||||
|
||||
|
@ -13,7 +13,7 @@ export default createComponent({
|
||||
maxDate: Date,
|
||||
showMark: Boolean,
|
||||
showTitle: Boolean,
|
||||
rowHeight: Number,
|
||||
rowHeight: [Number, String],
|
||||
formatter: Function,
|
||||
currentDate: [Date, Array],
|
||||
},
|
||||
|
@ -53,7 +53,7 @@ export default createComponent({
|
||||
default: 'bottom',
|
||||
},
|
||||
rowHeight: {
|
||||
type: Number,
|
||||
type: [Number, String],
|
||||
default: ROW_HEIGHT,
|
||||
},
|
||||
round: {
|
||||
@ -81,7 +81,7 @@ export default createComponent({
|
||||
default: true,
|
||||
},
|
||||
maxRange: {
|
||||
type: Number,
|
||||
type: [Number, String],
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user