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
编译后的 app.wxss 中引用 common.wxss 在内容之后,skyline 只允许引用在文件最前面,但阅读过之前的文档,为了避免样式覆盖,只能将 common.wxss 放在后面
还需要一个可以判断渲染器是 skyline 还是 webview 的 hook
useRenderer
this.renderer
The text was updated successfully, but these errors were encountered:
1 是老问题了,应该把 app 样式也抽取到独立的文件中进行引用,就能解决 app.css 的引用顺序问题:
@import './app-core.css'; @import './common.css';
Sorry, something went wrong.
简单看了一下,在 weapp 插件中新增一个 Taro API :
useRouter
@tarojs/plugin-platform-weapp
Taro.getRenderer()
根据 微信文档 描述,可通过 this.renderer 获取到渲染器类型,目前可以使用如下方法来获得:
import { getCurrentInstance } from '@tarojs/runtime' // 获得 this.renderer getCurrentInstance().page.renderer
React & Vue 均可用。
AdvancedCat
Successfully merging a pull request may close this issue.
这个特性解决了什么问题?
编译后的 app.wxss 中引用 common.wxss 在内容之后,skyline 只允许引用在文件最前面,但阅读过之前的文档,为了避免样式覆盖,只能将 common.wxss 放在后面
还需要一个可以判断渲染器是 skyline 还是 webview 的 hook
这个 API 长什么样?
useRenderer
返回 页面节点的this.renderer
The text was updated successfully, but these errors were encountered: