当前位置:网站首页>vant tabs组件选中第一个下划线位置异常
vant tabs组件选中第一个下划线位置异常
2022-07-02 09:38:00 【00008795】
错误图示例
产生场景:顶部标题是后台接口数据返回。vnat-tabs已经在data里面设置跳转到该页面是所选中状态active=0,数据出现后,下划线标签位置异常,在标题获取成功后再次设置active=0,无效果,但是有时偶现下划线数据正常。
原因分析:Tabs 组件在挂载时,会获取自身的宽度,并计算出底部条的位置。如果组件一开始处于隐藏状态,则获取到的宽度永远为 0,因此无法展示底部条位置。
问题解决:我使用了方法二
注意点:在获取标题数据完后调用selectComponent方法,不然重绘失效。
vant-tabs官方地址
边栏推荐
- Mongodb learning and sorting (condition operator, $type operator, limit() method, skip() method and sort() method)
- 原生方法合并word
- String (Analog
- II Stm32f407 chip GPIO programming, register operation, library function operation and bit segment operation
- From the perspective of attack surface, see the practice of zero trust scheme of Xinchuang
- 亚马逊云科技 Community Builder 申请窗口开启
- C#多维数组的属性获取方法及操作注意
- I STM32 development environment, keil5/mdk5.14 installation tutorial (with download link)
- TIPC 寻址2
- mysql 基本语句
猜你喜欢
How does the whole network display IP ownership?
【IDEA】使用插件一键逆向生成代码
Thanos Receiver
III Chip startup and clock system
抖音海外版TikTok:正与拜登政府敲定最终数据安全协议
RPA进阶(二)Uipath应用实践
A white hole formed by antineutrons produced by particle accelerators
念念不忘,必有回响 | 悬镜诚邀您参与OpenSCA用户有奖调研
Digital transformation takes the lead to resume production and work, and online and offline full integration rebuilds business logic
Is the Ren domain name valuable? Is it worth investing? What is the application scope of Ren domain name?
随机推荐
TIPC协议
Liftover for genome coordinate conversion
TIPC介绍1
Webauthn - official development document
Tidb DM alarm DM_ sync_ process_ exists_ with_ Error troubleshooting
RPA advanced (II) uipath application practice
LVM操作
【云原生】2.5 Kubernetes 核心实战(下)
Rest (XOR) position and thinking
I STM32 development environment, keil5/mdk5.14 installation tutorial (with download link)
从ros1到ros2配置的一些东西
Programmer growth Chapter 6: how to choose a company?
map集合赋值到数据库
SSRF
What is the relationship between digital transformation of manufacturing industry and lean production
String (Analog
Tick Data and Resampling
[idea] use the plug-in to reverse generate code with one click
LVM operation
III Chip startup and clock system