当前位置:网站首页>The small program vant tab component solves the problem of too much text and incomplete display

The small program vant tab component solves the problem of too much text and incomplete display

2022-07-04 22:58:00 Song Xiaoyu

When using applets , Some classification names may be too long , Lead to tab The problem of incomplete display of components will appear in the following figure .

Methods and steps

1. increase tab-class Label style class

<!-- increase tab-class Definition -->
<van-tabs tab-class="tab-class" sticky class="nav" active="{
     { active }}" bind:change="onCateChange"> 
	<van-tab wx:for="{
     {cate_list}}" wx:key="index" title="{
     {item.name}}"></van-tab>
</van-tabs>

2. Add style settings

.tab-class {
    
  flex: none !important;
}

Reference documents

tab The text is too long and incomplete

原网站

版权声明
本文为[Song Xiaoyu]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/185/202207042230011488.html