mirror of
https://github.com/element-plus/element-plus.git
synced 2025-03-07 15:47:57 +08:00
fix(components): [date-picker] Make shortcuts reactive (#7698)
This commit is contained in:
parent
c215966c9b
commit
07cae24985
@ -335,7 +335,7 @@ const rightMonth = computed(() => {
|
||||
return rightDate.value.month()
|
||||
})
|
||||
|
||||
const hasShortcuts = computed(() => !!shortcuts.length)
|
||||
const hasShortcuts = computed(() => !!shortcuts.value.length)
|
||||
|
||||
const minVisibleDate = computed(() => {
|
||||
if (dateUserInput.value.min !== null) return dateUserInput.value.min
|
||||
@ -679,7 +679,6 @@ emit('set-picker-option', ['handleClear', handleClear])
|
||||
// FIXME: fix the type for ep picker
|
||||
const pickerBase = inject('EP_PICKER_BASE') as any
|
||||
const {
|
||||
shortcuts,
|
||||
disabledDate,
|
||||
cellClassName,
|
||||
format,
|
||||
@ -687,6 +686,7 @@ const {
|
||||
arrowControl,
|
||||
clearable,
|
||||
} = pickerBase.props
|
||||
const shortcuts = toRef(pickerBase.props, 'shortcuts')
|
||||
const defaultValue = toRef(pickerBase.props, 'defaultValue')
|
||||
|
||||
watch(
|
||||
|
Loading…
Reference in New Issue
Block a user