Fixed #3871 - Deprecated indicator slot

pull/3976/head
Tuğçe Küçükoğlu 2023-04-18 15:09:35 +03:00
parent 0eb2981c04
commit f0b4bd2e3f
5 changed files with 23 additions and 30 deletions

View File

@ -212,6 +212,7 @@ export interface CascadeSelectSlots {
}): VNode[]; }): VNode[];
/** /**
* Custom indicator template. * Custom indicator template.
* @deprecated since v3.27.0. Use 'dropdownicon or loadingicon' slots.
*/ */
indicator(): VNode[]; indicator(): VNode[];
/** /**

View File

@ -30,16 +30,13 @@
</slot> </slot>
</span> </span>
<div class="p-cascadeselect-trigger" role="button" tabindex="-1" aria-hidden="true"> <div class="p-cascadeselect-trigger" role="button" tabindex="-1" aria-hidden="true">
<slot v-if="$slots.indicator" name="indicator"></slot> <slot v-if="loading" name="loadingicon" class="p-cascadeselect-trigger-icon">
<template v-else> <span v-if="loadingIcon" :class="['p-cascadeselect-trigger-icon pi-spin', loadingIcon]" aria-hidden="true" />
<slot v-if="loading" name="loadingicon" class="p-cascadeselect-trigger-icon"> <SpinnerIcon v-else class="p-cascadeselect-trigger-icon" spin aria-hidden="true" />
<span v-if="loadingIcon" :class="['p-cascadeselect-trigger-icon pi-spin', loadingIcon]" aria-hidden="true" /> </slot>
<SpinnerIcon v-else class="p-cascadeselect-trigger-icon" spin aria-hidden="true" /> <slot v-else name="dropdownicon" class="p-cascadeselect-trigger-icon">
</slot> <component :is="dropdownIcon ? 'span' : 'ChevronDownIcon'" :class="['p-cascadeselect-trigger-icon', dropdownIcon]" aria-hidden="true" />
<slot v-else name="dropdownicon" class="p-cascadeselect-trigger-icon"> </slot>
<component :is="dropdownIcon ? 'span' : 'ChevronDownIcon'" :class="['p-cascadeselect-trigger-icon', dropdownIcon]" aria-hidden="true" />
</slot>
</template>
</div> </div>
<span role="status" aria-live="polite" class="p-hidden-accessible"> <span role="status" aria-live="polite" class="p-hidden-accessible">
{{ searchResultMessageText }} {{ searchResultMessageText }}

View File

@ -273,6 +273,7 @@ export interface DropdownSlots {
}): VNode[]; }): VNode[];
/** /**
* Custom indicator template. * Custom indicator template.
* @deprecated since v3.27.0. Use 'dropdownicon or loadingicon' slots.
*/ */
indicator(): VNode[]; indicator(): VNode[];
/** /**

View File

@ -51,16 +51,13 @@
<component :is="clearIcon ? 'i' : 'TimesIcon'" :class="['p-dropdown-clear-icon', clearIcon]" @click="onClearClick" v-bind="clearIconProps" /> <component :is="clearIcon ? 'i' : 'TimesIcon'" :class="['p-dropdown-clear-icon', clearIcon]" @click="onClearClick" v-bind="clearIconProps" />
</slot> </slot>
<div class="p-dropdown-trigger"> <div class="p-dropdown-trigger">
<slot v-if="$slots.indicator" name="indicator"></slot> <slot v-if="loading" name="loadingicon" class="p-dropdown-trigger-icon">
<template v-else> <span v-if="loadingIcon" :class="['p-dropdown-trigger-icon pi-spin', loadingIcon]" aria-hidden="true" />
<slot v-if="loading" name="loadingicon" class="p-dropdown-trigger-icon"> <SpinnerIcon v-else class="p-dropdown-trigger-icon" spin aria-hidden="true" />
<span v-if="loadingIcon" :class="['p-dropdown-trigger-icon pi-spin', loadingIcon]" aria-hidden="true" /> </slot>
<SpinnerIcon v-else class="p-dropdown-trigger-icon" spin aria-hidden="true" /> <slot v-else name="dropdownicon" class="p-dropdown-trigger-icon">
</slot> <component :is="dropdownIcon ? 'span' : 'ChevronDownIcon'" :class="['p-dropdown-trigger-icon', dropdownIcon]" aria-hidden="true" />
<slot v-else name="dropdownicon" class="p-dropdown-trigger-icon"> </slot>
<component :is="dropdownIcon ? 'span' : 'ChevronDownIcon'" :class="['p-dropdown-trigger-icon', dropdownIcon]" aria-hidden="true" />
</slot>
</template>
</div> </div>
<Portal :appendTo="appendTo"> <Portal :appendTo="appendTo">
<transition name="p-connected-overlay" @enter="onOverlayEnter" @after-enter="onOverlayAfterEnter" @leave="onOverlayLeave" @after-leave="onOverlayAfterLeave"> <transition name="p-connected-overlay" @enter="onOverlayEnter" @after-enter="onOverlayAfterEnter" @leave="onOverlayLeave" @after-leave="onOverlayAfterLeave">

View File

@ -44,16 +44,13 @@
</div> </div>
</div> </div>
<div class="p-multiselect-trigger"> <div class="p-multiselect-trigger">
<slot v-if="$slots.indicator" name="indicator"></slot> <slot v-if="loading" name="loadingicon" class="p-multiselect-trigger-icon">
<template v-else> <span v-if="loadingIcon" :class="['p-multiselect-trigger-icon pi-spin', loadingIcon]" aria-hidden="true" />
<slot v-if="loading" name="loadingicon" class="p-multiselect-trigger-icon"> <SpinnerIcon v-else class="p-multiselect-trigger-icon" spin aria-hidden="true" />
<span v-if="loadingIcon" :class="['p-multiselect-trigger-icon pi-spin', loadingIcon]" aria-hidden="true" /> </slot>
<SpinnerIcon v-else class="p-multiselect-trigger-icon" spin aria-hidden="true" /> <slot v-else name="dropdownicon" class="p-multiselect-trigger-icon">
</slot> <component :is="dropdownIcon ? 'span' : 'ChevronDownIcon'" :class="['p-multiselect-trigger-icon', dropdownIcon]" aria-hidden="true" />
<slot v-else name="dropdownicon" class="p-multiselect-trigger-icon"> </slot>
<component :is="dropdownIcon ? 'span' : 'ChevronDownIcon'" :class="['p-multiselect-trigger-icon', dropdownIcon]" aria-hidden="true" />
</slot>
</template>
</div> </div>
<Portal :appendTo="appendTo"> <Portal :appendTo="appendTo">
<transition name="p-connected-overlay" @enter="onOverlayEnter" @after-enter="onOverlayAfterEnter" @leave="onOverlayLeave" @after-leave="onOverlayAfterLeave"> <transition name="p-connected-overlay" @enter="onOverlayEnter" @after-enter="onOverlayAfterEnter" @leave="onOverlayLeave" @after-leave="onOverlayAfterLeave">