diff --git a/components/calendar/generateCalendar.tsx b/components/calendar/generateCalendar.tsx index 9220e7d9c..44a2cb5bc 100644 --- a/components/calendar/generateCalendar.tsx +++ b/components/calendar/generateCalendar.tsx @@ -60,6 +60,7 @@ export interface CalendarProps { mode?: CalendarMode; fullscreen?: boolean; onChange?: (date: DateType | string) => void; + 'onUpdate:value'?: (date: DateType | string) => void; onPanelChange?: (date: DateType | string, mode: CalendarMode) => void; onSelect?: (date: DateType | string) => void; valueFormat?: string; @@ -88,7 +89,25 @@ function generateCalendar< const Calendar = defineComponent({ name: 'ACalendar', inheritAttrs: false, - emits: ['change', 'panelChange', 'select', 'update:value'], + props: [ + 'prefixCls', + 'locale', + 'validRange', + 'disabledDate', + 'dateFullCellRender', + 'dateCellRender', + 'monthFullCellRender', + 'monthCellRender', + 'headerRender', + 'value', + 'defaultValue', + 'mode', + 'fullscreen', + 'onChange', + 'onPanelChange', + 'onSelect', + 'valueFormat', + ] as any, slots: [ 'dateFullCellRender', 'dateCellRender', @@ -306,26 +325,6 @@ function generateCalendar< }, }); - Calendar.props = [ - 'prefixCls', - 'locale', - 'validRange', - 'disabledDate', - 'dateFullCellRender', - 'dateCellRender', - 'monthFullCellRender', - 'monthCellRender', - 'headerRender', - 'value', - 'defaultValue', - 'mode', - 'fullscreen', - 'onChange', - 'onPanelChange', - 'onSelect', - 'valueFormat', - ]; - Calendar.install = function (app: App) { app.component(Calendar.name, Calendar); return app; diff --git a/components/carousel/__tests__/__snapshots__/demo.test.js.snap b/components/carousel/__tests__/__snapshots__/demo.test.js.snap index ef65a0172..53c157a36 100644 --- a/components/carousel/__tests__/__snapshots__/demo.test.js.snap +++ b/components/carousel/__tests__/__snapshots__/demo.test.js.snap @@ -167,7 +167,7 @@ exports[`renders ./components/carousel/demo/basic.vue correctly 1`] = ` exports[`renders ./components/carousel/demo/customArrows.vue correctly 1`] = `