mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs(Calendar): split props
This commit is contained in:
parent
c7e51158aa
commit
4695dc29b9
@ -235,7 +235,6 @@ Set `poppable` to `false`, the calendar will be displayed directly on the page i
|
||||
|
||||
| Attribute | Description | Type | Default |
|
||||
|------|------|------|------|
|
||||
| v-model | Whether to show calendar | *boolean* | `false` |
|
||||
| type `v2.5.4` | Type,can be set to `range` `multiple` | *string* | `single` |
|
||||
| title | Title of calendar | *string* | `Calendar` |
|
||||
| color | Color for the bottom button and selected date | *string* | `#ee0a24` |
|
||||
@ -244,21 +243,36 @@ Set `poppable` to `false`, the calendar will be displayed directly on the page i
|
||||
| default-date | Default selected date | *Date \| Date[]* | Today |
|
||||
| row-height | Row height | *number \| string* | `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` |
|
||||
| round | Whether to show round corner | *boolean* | `true` |
|
||||
| show-mark | Whether to show background month mark | *boolean* | `true` |
|
||||
| show-title `v2.5.5` | Whether to show title | *boolean* | `true` |
|
||||
| show-subtitle `v2.5.5` | Whether to show subtitle | *boolean* | `true` |
|
||||
| show-confirm | Whether to show confirm button | *boolean* | `true` |
|
||||
| confirm-text | Confirm button text | *string* | `Confirm` |
|
||||
| confirm-disabled-text | Confirm button text when disabled | *string* | `Confirm` |
|
||||
|
||||
### Poppable Props
|
||||
|
||||
Following props are supported when the poppable is true
|
||||
|
||||
| Attribute | Description | Type | Default |
|
||||
|------|------|------|------|
|
||||
| v-model | Whether to show calendar | *boolean* | `false` |
|
||||
| position | Popup position, can be set to `top` `right` `left` | *string* | `bottom` |
|
||||
| round | Whether to show round corner | *boolean* | `true` |
|
||||
| close-on-popstate `v2.4.4` | Whether to close when popstate | *boolean* | `false` |
|
||||
| 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` |
|
||||
| get-container `v2.4.4` | Return the mount node for Calendar | _string \| () => Element_ | - |
|
||||
|
||||
### Range Props
|
||||
|
||||
Following props are supported when the type is range
|
||||
|
||||
| Attribute | Description | Type | Default |
|
||||
|------|------|------|------|
|
||||
| max-range `v2.4.3` | Number of selectable days | *number \| string* | - |
|
||||
| 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_ | - |
|
||||
|
||||
### Data Structure of Day
|
||||
|
||||
|
@ -237,7 +237,6 @@ export default {
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|------|------|------|------|
|
||||
| v-model | 是否显示日历弹窗 | *boolean* | `false` |
|
||||
| type `v2.5.4` | 选择类型:<br>`single`表示选择单个日期,<br>`multiple`表示选择多个日期,<br>`range`表示选择日期区间 | *string* | `single` |
|
||||
| title | 日历标题 | *string* | `日期选择` |
|
||||
| color | 主题色,对底部按钮和选中日期生效 | *string* | `#ee0a24` |
|
||||
@ -246,21 +245,36 @@ export default {
|
||||
| default-date | 默认选中的日期,`type`为`multiple`或`range`时为数组 | *Date \| Date[]* | 今天 |
|
||||
| row-height | 日期行高 | *number \| string* | `64` |
|
||||
| formatter | 日期格式化函数 | *(day: Day) => Day* | - |
|
||||
| position | 弹出位置,可选值为 `top` `right` `left` | *string* | `bottom` |
|
||||
| poppable | 是否以弹层的形式展示日历 | *boolean* | `true` |
|
||||
| round | 是否显示圆角弹窗 | *boolean* | `true` |
|
||||
| show-mark | 是否显示月份背景水印 | *boolean* | `true` |
|
||||
| show-title `v2.5.5` | 是否展示日历标题 | *boolean* | `true` |
|
||||
| show-subtitle `v2.5.5` | 是否展示日历副标题(年月) | *boolean* | `true` |
|
||||
| show-confirm | 是否展示确认按钮 | *boolean* | `true` |
|
||||
| confirm-text | 确认按钮的文字 | *string* | `确定` |
|
||||
| confirm-disabled-text | 确认按钮处于禁用状态时的文字 | *string* | `确定` |
|
||||
|
||||
### Poppable Props
|
||||
|
||||
当 Canlendar 的 `poppable` 为 `true` 时,支持以下 props:
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|------|------|------|------|
|
||||
| v-model | 是否显示日历弹窗 | *boolean* | `false` |
|
||||
| position | 弹出位置,可选值为 `top` `right` `left` | *string* | `bottom` |
|
||||
| round | 是否显示圆角弹窗 | *boolean* | `true` |
|
||||
| close-on-popstate `v2.4.4` | 是否在页面回退时自动关闭 | *boolean* | `false` |
|
||||
| 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* | `确定` |
|
||||
| get-container `v2.4.4` | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | *string \| () => Element* | - |
|
||||
|
||||
### Range Props
|
||||
|
||||
当 Canlendar 的 `type` 为 `range` 时,支持以下 props:
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|------|------|------|------|
|
||||
| max-range `v2.4.3` | 日期区间最多可选天数,默认无限制 | *number \| string* | - |
|
||||
| range-prompt `v2.4.3` | 范围选择超过最多可选天数时的提示文案 | *string* | `选择天数不能超过 xx 天` |
|
||||
| get-container `v2.4.4` | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | *string \| () => Element* | - |
|
||||
|
||||
### Day 数据结构
|
||||
|
||||
|
@ -169,7 +169,7 @@ export default {
|
||||
|
||||
### DatePicker Props
|
||||
|
||||
当时间选择器类型为 date 或 datetime 时,支持以下 props
|
||||
当时间选择器类型为 date 或 datetime 时,支持以下 props:
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|------|------|------|------|
|
||||
@ -178,7 +178,7 @@ export default {
|
||||
|
||||
### TimePicker Props
|
||||
|
||||
当时间选择器类型为 time 时,支持以下 props
|
||||
当时间选择器类型为 time 时,支持以下 props:
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|------|------|------|------|
|
||||
|
Loading…
x
Reference in New Issue
Block a user