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
[Taro Next] 提供扩展预渲染的能力 #6488
Labels
enhancement
New feature or request
Comments
Chen-jj
added
enhancement
New feature or request
P-2
Medium, minor/patch
and removed
taro next
labels
Jul 2, 2020
假设状态栏高度是动态获取的,预渲染时并不能知道应该取什么值,感觉这里应该可以通过给一个默认值解决吧。 |
预渲染的时候不渲染具体的值,把特定的位置,如 height: {小程序原生全局变量 },这个变量预渲染时不是已有的值,而是代码字符串,只是不确定 wxml 中能否访问小程序全局变量。 |
不行的,视图层不能访问逻辑层全局变量 |
这种情况能否使用 小程序原生组件 来实现呢?预编译的时候 应该没把这个编译进来吧 |
什么小程序原生组件,预渲染就是无网络情况下你的 wxml 结构咯 |
https://taro-docs.jd.com/taro/docs/mini-third-party |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
预渲染 的时候,自定义 header 要使用变量(状态栏高度),但是编译出来的是缺省值,所以进入页面的时候,总是要顶一下整个页面,有没有优化技巧。
比如这样,但是这样写挺生硬的,最好可以在组件文件内实现。
动图 如果看不完整 请点击在新的窗口打开
The text was updated successfully, but these errors were encountered: