当前位置:网站首页>小程序vant tab组件解决文字过多显示不全的问题
小程序vant tab组件解决文字过多显示不全的问题
2022-07-04 22:30:00 【宋小羽】
使用小程序时,某些分类名称可能会过长,导致tab组件显示就会出现下图显示不全的问题。

方法步骤
1. 增加tab-class标签样式类
<!--增加tab-class定义-->
<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. 增加样式设置
.tab-class {
flex: none !important;
}
参考文档
边栏推荐
- 企业如何跨越数字化鸿沟?尽在云原生2.0
- How diff are the contents of the same configuration item in different environments?
- Redis入门完整教程:有序集合详解
- 攻防世界 MISC 進階區 Erik-Baleog-and-Olaf
- Advanced area of attack and defense world misc 3-11
- Hit the core in the advanced area of misc in the attack and defense world
- [try to hack] wide byte injection
- Wake up day, how do I step by step towards the road of software testing
- Redis入门完整教程:哈希说明
- Persistence mechanism of redis
猜你喜欢

Google Earth engine (GEE) - tasks upgrade enables run all to download all images in task types with one click

Redis入门完整教程:Bitmaps

都说软件测试很简单有手就行,但为何仍有这么多劝退的?

Serial port data frame

Li Kou 98: verify binary search tree

攻防世界 misc 进阶区 2017_Dating_in_Singapore

Redis入门完整教程:有序集合详解

Co create a collaborative ecosystem of software and hardware: the "Joint submission" of graphcore IPU and Baidu PaddlePaddle appeared in mlperf

Duplicate ADMAS part name

【机器学习】手写数字识别
随机推荐
[roommate learned to use Bi report data processing in the time of King glory in one game]
攻防世界 MISC 进阶区 Ditf
Redis入门完整教程:键管理
About stack area, heap area, global area, text constant area and program code area
Wake up day, how do I step by step towards the road of software testing
Sobel filter
MySQL Architecture - logical architecture
剑指Offer 68 - II. 二叉树的最近公共祖先
Tla+ introductory tutorial (1): introduction to formal methods
[try to hack] wide byte injection
Redis: redis configuration file related configuration and redis persistence
Redis的持久化机制
Gnawing down the big bone - sorting (II)
Attack and defense world misc advanced area ditf
Introducing QA into the software development lifecycle is the best practice that engineers should follow
SPSS安装激活教程(包含网盘链接)
Logo special training camp Section IV importance of font design
Unity-VScode-Emmylua配置报错解决
通过Go语言创建CA与签发证书
攻防世界 misc 高手进阶区 a_good_idea