How to separate multiple names in vue by commas?

the effect I want:

clipboard.png

:

clipboard.png

:<span v-for="item in list.participant">{{item.name}}</span>

how to achieve it?

Jun.25,2022

p span:after {content: ",";}
p span:last-child:after {content: "";}


<span>{{list.participant.map(i=>i.name).join(',')}}</span>

p span:after {content: ",";}
p span:last-child:after {content: "" }
this is easy to operate


deal with it with spilt


:<span v-for="(item, index) in list.participant" :key="index">{{index === list.participant.length - 1 ?item.name : item.name + ','}}</span>


I simply modified
http://jsrun.net/DyXKp/edit

.
Menu