docs: remove all v2 version tag

This commit is contained in:
chenjiahan
2021-01-10 19:08:09 +08:00
parent 0f7c088f9f
commit 51bc1cee8a
101 changed files with 525 additions and 527 deletions
+20 -20
View File
@@ -247,7 +247,7 @@ Set `poppable` to `false`, the calendar will be displayed directly on the page i
| Attribute | Description | Type | Default |
| --- | --- | --- | --- |
| type `v2.5.4` | Typecan be set to `range` `multiple` | _string_ | `single` |
| type | Typecan be set to `range` `multiple` | _string_ | `single` |
| title | Title of calendar | _string_ | `Calendar` |
| color | Color for the bottom button and selected date | _string_ | `#ee0a24` |
| min-date | Min date | _Date_ | Today |
@@ -256,15 +256,15 @@ Set `poppable` to `false`, the calendar will be displayed directly on the page i
| row-height | Row height | _number \| string_ | `64` |
| formatter | Day formatter | _(day: Day) => Day_ | - |
| poppable | Whether to show the calendar inside a popup | _boolean_ | `true` |
| lazy-render `v2.8.1` | Whether to enable lazy render | _boolean_ | `true` |
| lazy-render | Whether to enable lazy render | _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-title | Whether to show title | _boolean_ | `true` |
| show-subtitle | Whether to show subtitle | _boolean_ | `true` |
| show-confirm | Whether to show confirm button | _boolean_ | `true` |
| readonly `v2.10.5` | Whether to be readonly | _boolean_ | `false` |
| readonly | Whether to be readonly | _boolean_ | `false` |
| confirm-text | Confirm button text | _string_ | `Confirm` |
| confirm-disabled-text | Confirm button text when disabled | _string_ | `Confirm` |
| first-day-of-week `v2.9.2` | Set the start day of week | _0-6_ | `0` |
| first-day-of-week | Set the start day of week | _0-6_ | `0` |
### Poppable Props
@@ -275,10 +275,10 @@ Following props are supported when the poppable is true
| v-model:show | 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_ | `true` |
| close-on-popstate | Whether to close when popstate | _boolean_ | `true` |
| close-on-click-overlay | Whether to close when overlay is clicked | _boolean_ | `true` |
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | _boolean_ | `true` |
| teleport `v2.4.4` | Return the mount node for Calendar | _string \| Element_ | - |
| teleport | Return the mount node for Calendar | _string \| Element_ | - |
### Range Props
@@ -286,9 +286,9 @@ Following props are supported when the type is range
| Attribute | Description | Type | Default |
| --- | --- | --- | --- |
| max-range `v2.4.3` | Number of selectable days | _number \| string_ | Unlimitied |
| range-prompt `v2.4.3` | Error message when exceeded max range | _string_ | `Choose no more than xx days` |
| allow-same-day `v2.5.6` | Whether the start and end time of the range is allowed on the same day | _boolean_ | `false` |
| max-range | Number of selectable days | _number \| string_ | Unlimitied |
| range-prompt | Error message when exceeded max range | _string_ | `Choose no more than xx days` |
| allow-same-day | Whether the start and end time of the range is allowed on the same day | _boolean_ | `false` |
### Multiple Props
@@ -296,8 +296,8 @@ Following props are supported when the type is multiple
| Attribute | Description | Type | Default |
| --- | --- | --- | --- |
| max-range `v2.7.2` | Max count of selectable days | _number \| string_ | Unlimitied |
| range-prompt `v2.4.3` | Error message when exceeded max count | _string_ | `Choose no more than xx days` |
| max-range | Max count of selectable days | _number \| string_ | Unlimitied |
| range-prompt | Error message when exceeded max count | _string_ | `Choose no more than xx days` |
### Data Structure of Day
@@ -316,12 +316,12 @@ Following props are supported when the type is multiple
| --- | --- | --- |
| select | Emitted when date is selected | _value: Date \| Date[]_ |
| confirm | Emitted after date selection is completeif `show-confirm` is `true`, it is Emitted after clicking the confirm button | _value: Date \| Date[]_ |
| open `v2.5.2` | Emitted when opening Popup | - |
| close `v2.5.2` | Emitted when closing Popup | - |
| opened `v2.5.2` | Emitted when Popup is opened | - |
| closed `v2.5.2` | Emitted when Popup is closed | - |
| unselect `v2.7.2` | Emitted when unselect date when type is multiple | _value: Date_ |
| month-show `v2.8.2` | Emitted when a month enters the visible area | _{ date: Date, title: string }_ |
| open | Emitted when opening Popup | - |
| close | Emitted when closing Popup | - |
| opened | Emitted when Popup is opened | - |
| closed | Emitted when Popup is closed | - |
| unselect | Emitted when unselect date when type is multiple | _value: Date_ |
| month-show | Emitted when a month enters the visible area | _{ date: Date, title: string }_ |
### Slots
@@ -337,7 +337,7 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get Calend
| Name | Description | Attribute | Return value |
| --- | --- | --- | --- |
| reset | Reset selected date to default date | - | - |
| scrollToDate `v2.12.2` | Scroll to date | _date: Date_ | - |
| scrollToDate | Scroll to date | _date: Date_ | - |
### Less Variables
+23 -23
View File
@@ -251,7 +251,7 @@ export default {
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| type `v2.5.4` | 选择类型:<br>`single`表示选择单个日期,<br>`multiple`表示选择多个日期,<br>`range`表示选择日期区间 | _string_ | `single` |
| type | 选择类型:<br>`single`表示选择单个日期,<br>`multiple`表示选择多个日期,<br>`range`表示选择日期区间 | _string_ | `single` |
| title | 日历标题 | _string_ | `日期选择` |
| color | 主题色,对底部按钮和选中日期生效 | _string_ | `#ee0a24` |
| min-date | 可选择的最小日期 | _Date_ | 当前日期 |
@@ -260,15 +260,15 @@ export default {
| row-height | 日期行高 | _number \| string_ | `64` |
| formatter | 日期格式化函数 | _(day: Day) => Day_ | - |
| poppable | 是否以弹层的形式展示日历 | _boolean_ | `true` |
| lazy-render `v2.8.1` | 是否只渲染可视区域的内容 | _boolean_ | `true` |
| lazy-render | 是否只渲染可视区域的内容 | _boolean_ | `true` |
| show-mark | 是否显示月份背景水印 | _boolean_ | `true` |
| show-title `v2.5.5` | 是否展示日历标题 | _boolean_ | `true` |
| show-subtitle `v2.5.5` | 是否展示日历副标题(年月) | _boolean_ | `true` |
| show-title | 是否展示日历标题 | _boolean_ | `true` |
| show-subtitle | 是否展示日历副标题(年月) | _boolean_ | `true` |
| show-confirm | 是否展示确认按钮 | _boolean_ | `true` |
| readonly `v2.10.5` | 是否为只读状态,只读状态下不能选择日期 | _boolean_ | `false` |
| readonly | 是否为只读状态,只读状态下不能选择日期 | _boolean_ | `false` |
| confirm-text | 确认按钮的文字 | _string_ | `确定` |
| confirm-disabled-text | 确认按钮处于禁用状态时的文字 | _string_ | `确定` |
| first-day-of-week `v2.9.2` | 设置周起始日 | _0-6_ | `0` |
| first-day-of-week | 设置周起始日 | _0-6_ | `0` |
### Poppable Props
@@ -279,10 +279,10 @@ export default {
| v-model:show | 是否显示日历弹窗 | _boolean_ | `false` |
| position | 弹出位置,可选值为 `top` `right` `left` | _string_ | `bottom` |
| round | 是否显示圆角弹窗 | _boolean_ | `true` |
| close-on-popstate `v2.4.4` | 是否在页面回退时自动关闭 | _boolean_ | `true` |
| close-on-popstate | 是否在页面回退时自动关闭 | _boolean_ | `true` |
| close-on-click-overlay | 是否在点击遮罩层后关闭 | _boolean_ | `true` |
| safe-area-inset-bottom | 是否开启[底部安全区适配](#/zh-CN/advanced-usage#di-bu-an-quan-qu-gua-pei) | _boolean_ | `true` |
| teleport `v2.4.4` | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| Element_ | - |
| teleport | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| Element_ | - |
### Range Props
@@ -290,9 +290,9 @@ export default {
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| max-range `v2.4.3` | 日期区间最多可选天数 | _number \| string_ | 无限制 |
| range-prompt `v2.4.3` | 范围选择超过最多可选天数时的提示文案 | _string_ | `选择天数不能超过 xx 天` |
| allow-same-day `v2.5.6` | 是否允许日期范围的起止时间为同一天 | _boolean_ | `false` |
| max-range | 日期区间最多可选天数 | _number \| string_ | 无限制 |
| range-prompt | 范围选择超过最多可选天数时的提示文案 | _string_ | `选择天数不能超过 xx 天` |
| allow-same-day | 是否允许日期范围的起止时间为同一天 | _boolean_ | `false` |
### Multiple Props
@@ -300,8 +300,8 @@ export default {
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| max-range `v2.7.2` | 日期最多可选天数 | _number \| string_ | 无限制 |
| range-prompt `v2.4.3` | 选择超过最多可选天数时的提示文案 | _string_ | `选择天数不能超过 xx 天` |
| max-range | 日期最多可选天数 | _number \| string_ | 无限制 |
| range-prompt | 选择超过最多可选天数时的提示文案 | _string_ | `选择天数不能超过 xx 天` |
### Day 数据结构
@@ -322,12 +322,12 @@ export default {
| --- | --- | --- |
| select | 点击并选中任意日期时触发 | _value: Date \| Date[]_ |
| confirm | 日期选择完成后触发,若 `show-confirm``true`,则点击确认按钮后触发 | _value: Date \| Date[]_ |
| open `v2.5.2` | 打开弹出层时触发 | - |
| close `v2.5.2` | 关闭弹出层时触发 | - |
| opened `v2.5.2` | 打开弹出层且动画结束后触发 | - |
| closed `v2.5.2` | 关闭弹出层且动画结束后触发 | - |
| unselect `v2.7.2` | 当日历组件的 `type``multiple` 时,取消选中日期时触发 | _value: Date_ |
| month-show `v2.8.2` | 当某个月份进入可视区域时触发 | _{ date: Date, title: string }_ |
| open | 打开弹出层时触发 | - |
| close | 关闭弹出层时触发 | - |
| opened | 打开弹出层且动画结束后触发 | - |
| closed | 关闭弹出层且动画结束后触发 | - |
| unselect | 当日历组件的 `type``multiple` 时,取消选中日期时触发 | _value: Date_ |
| month-show | 当某个月份进入可视区域时触发 | _{ date: Date, title: string }_ |
### Slots
@@ -340,10 +340,10 @@ export default {
通过 ref 可以获取到 Calendar 实例并调用实例方法,详见[组件实例方法](#/zh-CN/advanced-usage#zu-jian-shi-li-fang-fa)。
| 方法名 | 说明 | 参数 | 返回值 |
| ---------------------- | ---------------------- | ------------ | ------ |
| reset | 重置选中的日期到默认值 | - | - |
| scrollToDate `v2.12.2` | 滚动到某个日期 | _date: Date_ | - |
| 方法名 | 说明 | 参数 | 返回值 |
| ------------ | ---------------------- | ------------ | ------ |
| reset | 重置选中的日期到默认值 | - | - |
| scrollToDate | 滚动到某个日期 | _date: Date_ | - |
### 样式变量