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
H5
浏览器版本: Chrome 84 使用框架: React
任意View标签加上含相关属性的style,如 <View style={{ '--main-color': '#ff01cd'}}> ... </View>
<View style={{ '--main-color': '#ff01cd'}}> ... </View>
然后生成h5版。相同代码在weapp是可以生效的
在生成的taro-view-core标签上带有style,如 <taro-view-core style="--main-color: #ff01cd;"> ... </taro-view-core>
<taro-view-core style="--main-color: #ff01cd;"> ... </taro-view-core>
在生成的taro-view-core标签上没有style,如 <taro-view-core> ... </taro-view-core>
<taro-view-core> ... </taro-view-core>
Taro CLI 3.0.8 environment info: System: OS: macOS 10.15.6 Shell: 3.2.57 - /bin/bash Binaries: Node: 12.16.1 - /usr/local/bin/node Yarn: 1.22.0 - /usr/local/bin/yarn npm: 6.13.4 - /usr/local/bin/npm npmPackages: @tarojs/cli: 3.0.8 => 3.0.8 @tarojs/components: 3.0.8 => 3.0.8 @tarojs/mini-runner: 3.0.8 => 3.0.8 @tarojs/react: 3.0.8 => 3.0.8 @tarojs/runtime: 3.0.8 => 3.0.8 @tarojs/taro: 3.0.8 => 3.0.8 @tarojs/webpack-runner: 3.0.8 => 3.0.8 babel-preset-taro: 3.0.8 => 3.0.8 eslint-config-taro: 3.0.8 => 3.0.8 react: ^16.10.0 => 16.13.1 taro-ui: ^3.0.0-alpha.3 => 3.0.0-alpha.3
比较常见的主题色业务,我使用的是这样的方式,包括背景色字体色价格色等等,我都是使用这样的方式来进行的,在weapp一切正常在h5就没有生成这个style了
The text was updated successfully, but these errors were encountered:
fix(components): h5组件的 style 支持设置 css 变量,fix #7452
7e2f546
3.1.0-beta.5 修复
Sorry, something went wrong.
No branches or pull requests
相关平台
H5
浏览器版本: Chrome 84
使用框架: React
复现步骤
任意View标签加上含相关属性的style,如
<View style={{ '--main-color': '#ff01cd'}}> ... </View>
然后生成h5版。相同代码在weapp是可以生效的
期望结果
在生成的taro-view-core标签上带有style,如
<taro-view-core style="--main-color: #ff01cd;"> ... </taro-view-core>
实际结果
在生成的taro-view-core标签上没有style,如
<taro-view-core> ... </taro-view-core>
环境信息
补充信息
比较常见的主题色业务,我使用的是这样的方式,包括背景色字体色价格色等等,我都是使用这样的方式来进行的,在weapp一切正常在h5就没有生成这个style了
The text was updated successfully, but these errors were encountered: