mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-11 09:52:35 +00:00
Refactor #4274 - For Chips
This commit is contained in:
parent
b27321fdaa
commit
c4b7221efb
2 changed files with 12 additions and 3 deletions
13
components/lib/chips/Chips.d.ts
vendored
13
components/lib/chips/Chips.d.ts
vendored
|
@ -209,9 +209,18 @@ export interface ChipsSlots {
|
|||
*/
|
||||
removetokenicon(scope: {
|
||||
/**
|
||||
* Remove icon click event
|
||||
* Style class of the icon.
|
||||
*/
|
||||
onClick(): void;
|
||||
class: string;
|
||||
/**
|
||||
* Index of the token.
|
||||
*/
|
||||
index: number;
|
||||
/**
|
||||
* Remove token icon function.
|
||||
* @param {Event} event - Browser event
|
||||
*/
|
||||
onClick(event: Event, index: number): void;
|
||||
}): VNode[];
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<slot name="chip" :class="cx('label')" :value="val">
|
||||
<span :class="cx('label')" v-bind="ptm('label')">{{ val }}</span>
|
||||
</slot>
|
||||
<slot name="removetokenicon" :class="cx('removeTokenIcon')" :onClick="(event) => removeItem(event, i)">
|
||||
<slot name="removetokenicon" :class="cx('removeTokenIcon')" :index="i" :onClick="(event) => removeItem(event, i)">
|
||||
<component :is="removeTokenIcon ? 'span' : 'TimesCircleIcon'" :class="[cx('removeTokenIcon'), removeTokenIcon]" @click="removeItem($event, i)" aria-hidden="true" v-bind="ptm('removeTokenIcon')" />
|
||||
</slot>
|
||||
</li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue