Add intersperse component
What does this MR do?
This MR adds a new component: <gl-intersperse>
, which separates a list of elements by a given character (the default is ,
).
Example:
...
data {
items = [
'item 1',
'item 2',
'item 3'
]
}
...
<gl-intersperse>
<span v-for="item in items">{{ item }}</span>
</gl-intersperse>
will render:
<span>
<span>item 1</span>,
<span>item 2</span>,
<span>item 3</span>
</span>
Optionally the character used for the last separator can be set independently. Per default it uses the given separator value.
For more information see the added documentation.