Skip to content

Commit 600c129

Browse files
committed
feat(BFormTags): Add tag scoped slot
1 parent 7110ec9 commit 600c129

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

packages/bootstrap-vue-3/src/components/BFormTags/BFormTags.vue

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,19 @@
3333
:id="`${computedId}tag_list__`"
3434
class="b-form-tags-list list-unstyled mb-0 d-flex flex-wrap align-items-center"
3535
>
36-
<b-form-tag
37-
v-for="tag in tags"
38-
:key="tag"
39-
:class="tagClass"
40-
tag="li"
41-
:variant="tagVariant"
42-
:pill="tagPillsBoolean"
43-
@remove="removeTag"
44-
>{{ tag }}</b-form-tag
45-
>
36+
<template v-for="tag in tags">
37+
<slot name="tag" v-bind="{tag, tagClass, tagVariant, tagPillsBoolean, removeTag}">
38+
<b-form-tag
39+
:key="tag"
40+
:class="tagClass"
41+
tag="li"
42+
:variant="tagVariant"
43+
:pill="tagPillsBoolean"
44+
@remove="removeTag"
45+
>{{ tag }}</b-form-tag
46+
>
47+
</slot>
48+
</template>
4649
<li
4750
role="none"
4851
aria-live="off"

0 commit comments

Comments
 (0)