docs(components): [date-picker] improve event type (#21125)

* docs(components): [date-picker] improve event type

* docs: update
This commit is contained in:
sea
2025-06-24 22:00:13 +08:00
committed by GitHub
parent 47ea8e855e
commit 49e1d594fa
2 changed files with 18 additions and 17 deletions

View File

@@ -198,15 +198,15 @@ Note, date time locale (month name, first day of the week ...) are also configur
### Events
| Name | Description | Type |
| --------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| change | triggers when user confirms the value | ^[Function]`(val: typeof v-model) => void` |
| blur | triggers when Input blurs | ^[Function]`(e: FocusEvent) => void` |
| focus | triggers when Input focuses | ^[Function]`(e: FocusEvent) => void` |
| clear ^(2.7.7) | triggers when the clear icon is clicked in a clearable DatePicker | ^[Function]`() => void` |
| calendar-change | triggers when the calendar selected date is changed. | ^[Function]`(val: [Date, null \| Date]) => void` |
| panel-change | triggers when the navigation button click. | ^[Function]`(date: Date \| [Date, Date], mode: 'month' \| 'year', view?: string) => void` |
| visible-change | triggers when the DatePicker's dropdown appears/disappears | ^[Function]`(visibility: boolean) => void` |
| Name | Description | Type |
| --------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| change | triggers when user confirms the value | ^[Function]`(val: typeof v-model) => void` |
| blur | triggers when Input blurs | ^[Function]`(e: FocusEvent) => void` |
| focus | triggers when Input focuses | ^[Function]`(e: FocusEvent) => void` |
| clear ^(2.7.7) | triggers when the clear icon is clicked in a clearable DatePicker | ^[Function]`() => void` |
| calendar-change | triggers when the calendar selected date is changed. Only for `range` | ^[Function]`(val: [Date, null \| Date]) => void` |
| panel-change | triggers when the navigation button click. | ^[Function]`(date: Date \| [Date, Date], mode: 'month' \| 'year', view?: string) => void` |
| visible-change | triggers when the DatePicker's dropdown appears/disappears | ^[Function]`(visibility: boolean) => void` |
### Slots

View File

@@ -119,14 +119,15 @@ datetime-picker/custom-icon
## Events
| Name | Description | Parameters |
| --------------- | ----------------------------------------------------------------------------- | ----------------------------------------- |
| change | triggers when user confirms the value | component's binding value |
| blur | triggers when Input blurs | `(e: FocusEvent)` |
| focus | triggers when Input focuses | `(e: FocusEvent)` |
| clear ^(2.7.7) | triggers when the clear icon is clicked in a clearable DateTimePicker | ^[Function]`() => void` |
| calendar-change | triggers when the calendar selected date is changed. Only for `datetimerange` | [Date, Date] |
| visible-change | triggers when the DateTimePicker's dropdown appears/disappears | true when it appears, and false otherwise |
| Name | Description | Parameters |
| --------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| change | triggers when user confirms the value | ^[Function]`(val: typeof v-model) => void` |
| blur | triggers when Input blurs | ^[Function]`(e: FocusEvent) => void` |
| focus | triggers when Input focuses | ^[Function]`(e: FocusEvent) => void` |
| clear ^(2.7.7) | triggers when the clear icon is clicked in a clearable DateTimePicker | ^[Function]`() => void` |
| calendar-change | triggers when the calendar selected date is changed. Only for `range` | ^[Function]`(val: [Date, null \| Date]) => void` |
| panel-change | triggers when the navigation button click. | ^[Function]`(date: Date \| [Date, Date], mode: 'month' \| 'year', view?: string) => void` |
| visible-change | triggers when the DateTimePicker's dropdown appears/disappears | ^[Function]`(visibility: boolean) => void` |
## Slots