Browse Source

名字过长自动隐藏

Limengbo 6 years ago
parent
commit
00fdf94c2c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compontents/ranking/ranking.wxml

+ 2 - 2
compontents/ranking/ranking.wxml

@@ -23,7 +23,7 @@
             <view class="rank-head">
                 <text class="rank-text">{{item.rank}}</text>
                 <image src="{{item.users.headImgUrl ? item.users.headImgUrl : (item.users.gender == 1 ? '../../pages/image/boy.png' : '../../pages/image/girl.png' )}}" class="head-img"></image>
-                <text style="width: 120px; overflow: hidden;">{{item.users.wechatName}}</text>
+                <text style="width: 120px; overflow: hidden;white-space:nowrap;text-overflow:ellipsis;">{{item.users.wechatName}}</text>
             </view>
             <text wx:if="{{myData.exp >= 0}}" class="medal-num">LV{{item.number}}({{item.exp}})</text>
             <text wx:else class="medal-num">{{item.number}}{{str}}</text>
@@ -36,7 +36,7 @@
             <text wx:elif="{{indexs == 3}}" class="rank-text">{{rankData.userQuestionCorrectRank == '0' ? '1000+' : rankData.userQuestionCorrectRank}}</text>
             <text wx:else class="rank-text">{{rankData.userMetalRank == '0' ? '1000+' : rankData.userMetalRank}}</text>
             <image src="{{rankData.users.headImgUrl}}" class="head-img"></image>
-            <text style="width: 120px; overflow: hidden;">{{rankData.users.wechatName}}</text>
+            <text style="width: 120px; overflow: hidden;white-space:nowrap;text-overflow:ellipsis;">{{rankData.users.wechatName}}</text>
         </view>
         <!--判断显示个人排名-->
         <view wx:if="{{indexs == 1}}">