Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

van-sticky内部子元素隐藏后高度未重新计算 #5243

Closed
k103hub opened this issue Feb 21, 2023 · 1 comment
Closed

van-sticky内部子元素隐藏后高度未重新计算 #5243

k103hub opened this issue Feb 21, 2023 · 1 comment
Labels

Comments

@k103hub
Copy link

k103hub commented Feb 21, 2023

问题描述

<view class="page-wrapper">
  <van-sticky>
    <view wx:if="{{_show}}">
      <view wx:for="{{[1,2,3,4,5]}}"> AAA </view>
    </view>
  </van-sticky>
  <view>CCC</view>
  <van-button bind:click="onClick">按钮</van-button>
</view>

Page({
  data: {
    _show: true,
  },
  onClick(options) {
    this.setData({  _show: false })
  },
})

Vant Weapp 版本

1.10.12

描述一下你遇到的问题。

内部子元素隐藏后未重新计算高度,导致下方元素位置不变,出现空白

重现步骤

点击按钮

设备/浏览器

ios

@johnsonwong666
Copy link
Collaborator

该issue 在vant-weapp2.0 解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants