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

导航栏骨架无高度初值塌陷问题 #41

Open
qywk99 opened this issue Mar 16, 2023 · 0 comments
Open

导航栏骨架无高度初值塌陷问题 #41

qywk99 opened this issue Mar 16, 2023 · 0 comments

Comments

@qywk99
Copy link
Collaborator

qywk99 commented Mar 16, 2023

导航栏骨架无高度初值塌陷问题指的是,打开某个有导航栏页面的一瞬间的有塌陷问题。(把isLoading关掉,看起来比较明显)

这是我的一种解决思路。(成功)
在ui-fixed组件中content.height修改为 (content.height || sys_navBar),可以解决导航栏无高度初值塌陷问题。
这种方法可能治标不治本,一些没有传入content.height的也被赋为导航栏高度初值,但后面也会根据重新计算实际高度,重新渲染。
<view class="skeleton" style="{{'height: '+(content.height||sys_navBar)+'px'}} {{width?'width:' + width + 'px;':''}}" id="skeleton-{{_uid}}" wx:if="{{sticky?fixed:placeholder&&fixed}}"/>

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

No branches or pull requests

1 participant