Vuejs v-for on inline elements trims whitespace
From the Docs on List Rendering > v-for
on a <template>
Similar to template
v-if
, you can also use a<template>
tag withv-for
to render a block of multiple elements. For example:
<ul> <template v-for="item in items"> <li>{{ item.msg }}</li> <li class="divider" role="presentation"></li> </template></ul>
So in order to get sibling elements (and yeah, a breaking space character  
would count as one), you'll have to add the loop to a parent <template>
container and then include any elements / spacing you want in the looped contents like this:
<template v-for="fruit in fruits" > <span>{{fruit}}</span> </template>
As of Vue 2.x+, templates trim any breaking space characters, even if they are escaped.
Instead, you can add a slot or text interpolation like this:
<template v-for="fruit in fruits" > <span>{{fruit}}</span><slot> </slot></template>
<template v-for="fruit in fruits" > <span>{{fruit}}</span>{{ ' ' }}</template>
If you only want spaces in-between elements, you can output the space conditionally:
<template v-for="(fruit, i) in fruits" > <span>{{fruit}}</span>{{ i < fruits.length -1 ? ', ': '' }}</template>
Demo in Stack Snippets
Further Reading:
Issue #1841 - Suggestion: v-glue / v-for element joins
I had a case where I needed to wrap each character (including spaces) of a string in a <span>
and solved it this way.
<template v-for="(letter, i) in 'My text with spaces'"> <span v-if="letter !== ' '">{{ letter }}</span> <span v-else> </span></template>
You can use CSS:
<a v-for="fruit in fruits" v-bind:href="fruit.url" v-html="fruit.label" style="margin-right: 5px;"></a>