mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [date-picker-panel] remove pick emit declaration (#23081)
* fix(components): [date-picker-panel] remove pick emit declaration * fix: dont duplicate onPick calls if we remove the 'pick' emit the onPick calls are duplicated with the common/picker.vue one
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { defineComponent, inject, provide, reactive, toRefs } from 'vue'
|
||||
import { omit } from 'lodash-unified'
|
||||
import dayjs from 'dayjs'
|
||||
import customParseFormat from 'dayjs/plugin/customParseFormat.js'
|
||||
import advancedFormat from 'dayjs/plugin/advancedFormat.js'
|
||||
@@ -32,15 +33,15 @@ dayjs.extend(isSameOrBefore)
|
||||
export default defineComponent({
|
||||
name: 'ElDatePickerPanel',
|
||||
install: null,
|
||||
inheritAttrs: false,
|
||||
props: datePickerPanelProps,
|
||||
emits: [
|
||||
UPDATE_MODEL_EVENT,
|
||||
'calendar-change',
|
||||
'panel-change',
|
||||
'visible-change',
|
||||
'pick',
|
||||
],
|
||||
setup(props, { slots, emit }) {
|
||||
setup(props, { slots, emit, attrs }) {
|
||||
const ns = useNamespace('picker-panel')
|
||||
const pickerInjection = inject(PICKER_BASE_INJECTION_KEY, undefined)
|
||||
if (isUndefined(pickerInjection)) {
|
||||
@@ -72,6 +73,7 @@ export default defineComponent({
|
||||
const Component = getPanel(props.type)
|
||||
return (
|
||||
<Component
|
||||
{...omit(attrs, 'onPick')}
|
||||
{...props}
|
||||
parsedValue={parsedValue.value}
|
||||
onSet-picker-option={onSetPickerOption}
|
||||
|
||||
Reference in New Issue
Block a user