返回截取字符串:str.substr (startIndex,endIndex)
返回分割字符串数组:str.split(’,’)

实例:
在这里插入图片描述

<view v-for="ele in item.goodsNames.substr(0,item.goodsNames.length-1).split(',')">
	{{ele}}
</view>
Logo

前往低代码交流专区

更多推荐