Refactor #4274 - For Chips
parent
b27321fdaa
commit
c4b7221efb
|
@ -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…
Reference in New Issue