We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
<camera wx:if="showCamera" ></camera>
Page({ data: { showCamera: true }, onLoad: { this.setData({ showCamera: false }); } })
camera 还是会展示出来,就只有相机展示(如果 <camera> 元素里面还有其他元素的话,这些元素不会展示)
camera
<camera>
The text was updated successfully, but these errors were encountered:
猜测,如果页面有系统资源,会提前加载。按理说首次渲染的 data 是 onShow 之后的,但是这里唯独相机出来了,所以应该是系统资源做了特殊的处理导致的。
data
onShow
这里的解决方案就是反过来用就好了。data 不要设置为 true,在 onLoad 里面判断真的要展示的时候才设置为 true
true
onLoad
Sorry, something went wrong.
No branches or pull requests
camera
还是会展示出来,就只有相机展示(如果<camera>
元素里面还有其他元素的话,这些元素不会展示)The text was updated successfully, but these errors were encountered: