<template>
<div>
<span v-for="(item,index) in caller" :key='index' ref="groupname">{{caller.groupname}},</span>
</div>
</template>
export default {
data(){
return{
caller:[]
}
},
update(){
//删除小组名称最后一项的逗号
let _this=this;
if(_this.$refs.groupname){
let groupname=_this.$refs.groupname;
let lastGruop=groupname[groupname.length-1];
let txtGroupName=groupname.innerText;
let lastGroups=txtGroupName.split("");
if(lastGroups[lastGroups.length-1]==","){
lastGroups.length=lastGroups.length-1;
}
lastGroups=lastGroups.join("");
lastGroup.innerText=lastGroups;
}
}
}