tag样式直接用

超出文本省略号,间距

1.axml

<view>
  <view class="search_container">
    <view class="search_chunk">
      <tag size="lg" ghost="fasle" class="search_tag">
          {{item}}
      </tag>
    </view>
  </view>
</view>

2.acss

.search_container {
  display: flex;
  width: 100%;
  padding-top: 20%;
  flex-wrap: wrap;
}

.search_chunk {
  margin-top: 5%;
  margin-left: 4%;
}

.search_tag {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 125px;
  text-align: center;
  color: #666666;
  border: #666666;
  background: #f2f2f2
}

效果如下

tag样式直接用

上一篇:详解:34word-wrap


下一篇:弹性盒布局