refactor: [date-picker] rename time-arrow-control (#13651)

* refactor: [date-picker] remove time-arrow-control

* docs: rename time-arrow-control
This commit is contained in:
btea 2023-08-11 20:51:34 +08:00 committed by GitHub
parent 564476b064
commit a8324ca421
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 14 deletions

View File

@ -76,7 +76,7 @@ datetime-picker/default-time
| placeholder | placeholder in non-range mode | string | — | — |
| start-placeholder | placeholder for the start date in range mode | string | — | — |
| end-placeholder | placeholder for the end date in range mode | string | — | — |
| time-arrow-control | whether to pick time using arrow buttons | boolean | — | false |
| arrow-control | whether to pick time using arrow buttons | boolean | — | false |
| type | type of the picker | string | year/month/date/datetime/ week/datetimerange/daterange | date |
| format | format of the displayed value in the input box | string | see [date formats](/en-US/component/date-picker#date-formats) | YYYY-MM-DD HH:mm:ss |
| popper-class | custom class name for DateTimePicker's dropdown | string | — | — |

View File

@ -50,7 +50,6 @@
<time-pick-panel
:visible="timePickerVisible"
:format="timeFormat"
:time-arrow-control="arrowControl"
:parsed-value="innerDate"
@pick="handleTimePick"
/>
@ -245,8 +244,7 @@ const slots = useSlots()
const { t, lang } = useLocale()
const pickerBase = inject('EP_PICKER_BASE') as any
const popper = inject(TOOLTIP_INJECTION_KEY)
const { shortcuts, disabledDate, cellClassName, defaultTime, arrowControl } =
pickerBase.props
const { shortcuts, disabledDate, cellClassName, defaultTime } = pickerBase.props
const defaultValue = toRef(pickerBase.props, 'defaultValue')
const currentViewRef = ref<{ focus: () => void }>()

View File

@ -56,7 +56,6 @@
:visible="minTimePickerVisible"
:format="timeFormat"
datetime-role="start"
:time-arrow-control="arrowControl"
:parsed-value="leftDate"
@pick="handleMinTimePick"
/>
@ -99,7 +98,6 @@
datetime-role="end"
:visible="maxTimePickerVisible"
:format="timeFormat"
:time-arrow-control="arrowControl"
:parsed-value="rightDate"
@pick="handleMaxTimePick"
/>
@ -287,14 +285,8 @@ const emit = defineEmits([
const unit = 'month'
// FIXME: fix the type for ep picker
const pickerBase = inject('EP_PICKER_BASE') as any
const {
disabledDate,
cellClassName,
format,
defaultTime,
arrowControl,
clearable,
} = pickerBase.props
const { disabledDate, cellClassName, format, defaultTime, clearable } =
pickerBase.props
const shortcuts = toRef(pickerBase.props, 'shortcuts')
const defaultValue = toRef(pickerBase.props, 'defaultValue')
const { lang } = useLocale()