text组件文本换行怎么不起作用?
发布于 4 年前 作者 minyan 360 次浏览 来自 问答
<view class="tab">
         <van-tabs bind:click="onClick" animated swipeable sticky>
            <van-tab title="场地简介">
               <text class='text'  decode="{{true}}">
               {{spaceInfo.jieshao}}
               </text>
            </van-tab>
            <van-tab title="设备清单">
               <image class="url" src="{{spaceInfo.list}}" mode="widthFix"></image>
            </van-tab>
         </van-tabs>
      </view>

.tab{
  margin-top: 35rpx;
}
.text{
  word-break: break-all;
  word-wrap: break-word;
  font-size: 15px;
}

  

  onLoad: function (options) {
    // console.log(options)
    db.collection("spacelist").doc(options.id).get({
      success: res => {
        this.setData({
          spaceInfo: res.data
        })
      }
    })
  },

1 回复
回到顶部