Refactor #4274 - For Chips
parent
b27321fdaa
commit
c4b7221efb
|
@ -209,9 +209,18 @@ export interface ChipsSlots {
|
||||||
*/
|
*/
|
||||||
removetokenicon(scope: {
|
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[];
|
}): VNode[];
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<slot name="chip" :class="cx('label')" :value="val">
|
<slot name="chip" :class="cx('label')" :value="val">
|
||||||
<span :class="cx('label')" v-bind="ptm('label')">{{ val }}</span>
|
<span :class="cx('label')" v-bind="ptm('label')">{{ val }}</span>
|
||||||
</slot>
|
</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')" />
|
<component :is="removeTokenIcon ? 'span' : 'TimesCircleIcon'" :class="[cx('removeTokenIcon'), removeTokenIcon]" @click="removeItem($event, i)" aria-hidden="true" v-bind="ptm('removeTokenIcon')" />
|
||||||
</slot>
|
</slot>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in New Issue