Refactor #3832 Refactor #3833 - For Calendar

pull/3976/head
Tuğçe Küçükoğlu 2023-04-18 15:03:17 +03:00
parent e1feeef23a
commit 0eb2981c04
3 changed files with 6 additions and 6 deletions

View File

@ -462,8 +462,8 @@ const CalendarSlots = [
description: 'Custom content for the calendar decade.' description: 'Custom content for the calendar decade.'
}, },
{ {
name: 'triggericon', name: 'dropdownicon',
description: 'Custom trigger icon template.' description: 'Custom dropdown icon template.'
}, },
{ {
name: 'previcon', name: 'previcon',

View File

@ -109,7 +109,7 @@ export interface CalendarProps {
showIcon?: boolean | undefined; showIcon?: boolean | undefined;
/** /**
* Icon of the calendar button. * Icon of the calendar button.
* @deprecated since v3.27.0. Use 'triggericon' slot. * @deprecated since v3.27.0. Use 'dropdownicon' slot.
*/ */
icon?: string | undefined; icon?: string | undefined;
/** /**
@ -369,9 +369,9 @@ export interface CalendarSlots {
years: string[] | undefined; years: string[] | undefined;
}): VNode[]; }): VNode[];
/** /**
* Custom trigger icon template. * Custom dropdown icon template.
*/ */
triggericon(): VNode[]; dropdownicon(): VNode[];
/** /**
* Custom previous icon template. * Custom previous icon template.
*/ */

View File

@ -39,7 +39,7 @@
:aria-controls="panelId" :aria-controls="panelId"
> >
<template #icon> <template #icon>
<slot name="triggericon"> <slot name="dropdownicon">
<component :is="icon ? 'span' : 'CalendarIcon'" :class="icon" /> <component :is="icon ? 'span' : 'CalendarIcon'" :class="icon" />
</slot> </slot>
</template> </template>