From 49e1d594fa7cbabdbf3958591d44c9e456563005 Mon Sep 17 00:00:00 2001 From: sea <45450994+warmthsea@users.noreply.github.com> Date: Tue, 24 Jun 2025 22:00:13 +0800 Subject: [PATCH] docs(components): [date-picker] improve event type (#21125) * docs(components): [date-picker] improve event type * docs: update --- docs/en-US/component/date-picker.md | 18 +++++++++--------- docs/en-US/component/datetime-picker.md | 17 +++++++++-------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/docs/en-US/component/date-picker.md b/docs/en-US/component/date-picker.md index 950a2b3b86..dbbe79a69c 100644 --- a/docs/en-US/component/date-picker.md +++ b/docs/en-US/component/date-picker.md @@ -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 diff --git a/docs/en-US/component/datetime-picker.md b/docs/en-US/component/datetime-picker.md index 2dce9258ab..07aca00bcc 100644 --- a/docs/en-US/component/datetime-picker.md +++ b/docs/en-US/component/datetime-picker.md @@ -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