问题:
使用css属性 white-space:nowrap 无法让文字一行展示超出隐藏,显示省略号(时好时坏)
为保险 我采用用js 先过滤一次需要渲染的数据
tansf (e){
let a = e.replace(/[]/g,"") // 去空格
a = a.replace(/[\r\n]/g,"") //去回车
return a
}
使用:
<view>{{tansf(item)}}</view>
//<view class="value text-ellipsis">{{tansf(item[displayItem.prop])}}</view>