mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
docs: 修复 Tabs 隐藏显示的错误 (#4138)
This commit is contained in:
parent
c21e39784f
commit
7f9fa00c0b
@ -189,10 +189,10 @@ Tabs 组件在挂载时,会获取自身的宽度,并计算出底部条的位
|
||||
|
||||
#### 解决方法
|
||||
|
||||
方法一,使用 `v-if` 来控制组件展示,使组件重新初始化:
|
||||
方法一,使用 `wx:if` 来控制组件展示,使组件重新初始化:
|
||||
|
||||
```html
|
||||
<van-tabs v-if="show" />
|
||||
<van-tabs wx:if="show" />
|
||||
```
|
||||
|
||||
方法二,调用组件的 resize 方法来主动触发重绘:
|
||||
|
Loading…
x
Reference in New Issue
Block a user