You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.
问题说明:在使用数据修改某元素的display属性时,规定页面初次渲染时该元素display: none,但由于数据填入/计算时间和显示时间有差值,导致初次渲染时该元素会先显示后消失。
解决办法:不使用css: display属性来隐藏元素,而是改用微信小程序自带的hidden属性来对元素进行隐藏。
注意:
(1)wx:if的渲染速度和直接计算display值后渲染的速度相当,因此wx:if并不能解决问题。
(2)将元素打包成组件后使用props传值也不能解决该问题。
The text was updated successfully, but these errors were encountered: