mirror of
https://github.com/element-plus/element-plus.git
synced 2025-04-06 16:30:35 +08:00
refactor(components): [time-select] using built-in constants (#20079)
refactor(components): [time-select] convert to a constant
This commit is contained in:
parent
39a0b4aab9
commit
5855db4f5c
@ -12,8 +12,8 @@
|
||||
:filterable="editable"
|
||||
:empty-values="emptyValues"
|
||||
:value-on-clear="valueOnClear"
|
||||
@update:model-value="(event) => $emit('update:modelValue', event)"
|
||||
@change="(event) => $emit('change', event)"
|
||||
@update:model-value="(event) => $emit(UPDATE_MODEL_EVENT, event)"
|
||||
@change="(event) => $emit(CHANGE_EVENT, event)"
|
||||
@blur="(event) => $emit('blur', event)"
|
||||
@focus="(event) => $emit('focus', event)"
|
||||
@clear="() => $emit('clear')"
|
||||
@ -41,6 +41,8 @@ import ElSelect from '@element-plus/components/select'
|
||||
import { useFormDisabled } from '@element-plus/components/form'
|
||||
import ElIcon from '@element-plus/components/icon'
|
||||
import { useLocale, useNamespace } from '@element-plus/hooks'
|
||||
import { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'
|
||||
|
||||
import { timeSelectProps } from './time-select'
|
||||
import { compareTime, formatTime, nextTime, parseTime } from './utils'
|
||||
|
||||
@ -52,7 +54,7 @@ defineOptions({
|
||||
name: 'ElTimeSelect',
|
||||
})
|
||||
|
||||
defineEmits(['change', 'blur', 'focus', 'clear', 'update:modelValue'])
|
||||
defineEmits([CHANGE_EVENT, 'blur', 'focus', 'clear', UPDATE_MODEL_EVENT])
|
||||
|
||||
const props = defineProps(timeSelectProps)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user