Skip to content
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

h5 下 createAnimation 创建的样式 权重与小程序不一致 #10245

Closed
hannq opened this issue Sep 8, 2021 · 2 comments · Fixed by #10267
Closed

h5 下 createAnimation 创建的样式 权重与小程序不一致 #10245

hannq opened this issue Sep 8, 2021 · 2 comments · Fixed by #10267
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Milestone

Comments

@hannq
Copy link
Contributor

hannq commented Sep 8, 2021

相关平台

H5

浏览器版本: Microsoft Edge 91
使用框架: React

复现步骤

微信小程序下 createAnimation 样式权重是 行内style

微信小程序下createAnimation

h5下 createAnimation 样式权重是 属性选择器
h5下createAnimation

h5 下权重过低,建议是否可以追加权重 或者 !important

期望结果

h5下 createAnimation 覆盖原有样式

实际结果

h5下 createAnimation 权重过低,无法覆盖原有样式

环境信息

👽 Taro v3.3.7


  Taro CLI 3.3.7 environment info:
    System:
      OS: macOS 11.5.2
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 14.17.4 - ~/.nvm/versions/node/v14.17.4/bin/node
      npm: 6.14.14 - ~/.nvm/versions/node/v14.17.4/bin/npm
    npmPackages:
      @tarojs/components: 3.3.7 => 3.3.7 
      @tarojs/mini-runner: 3.3.7 => 3.3.7 
      @tarojs/react: 3.3.7 => 3.3.7 
      @tarojs/runtime: 3.3.7 => 3.3.7 
      @tarojs/taro: 3.3.7 => 3.3.7 
      @tarojs/webpack-runner: 3.3.7 => 3.3.7 
      babel-preset-taro: 3.3.7 => 3.3.7 
      eslint-config-taro: 3.3.7 => 3.3.7 
      react: ^17.0.0 => 17.0.2 
      taro-ui: ^3.0.0-alpha.10 => 3.0.0-alpha.10 
    npmGlobalPackages:
      typescript: 4.3.5

@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Sep 8, 2021
@hannq
Copy link
Contributor Author

hannq commented Sep 9, 2021

临时改了下 @tarojs/taro-h5/src/api/createAnimation/index.js 加了 !important,勉强能能用,希望官方解决下
临时fix;

@Chen-jj
Copy link
Contributor

Chen-jj commented Sep 10, 2021

@hannq 直接提 PR 咯

@Chen-jj Chen-jj added this to the 3.3.8 milestone Sep 14, 2021
@hannq hannq closed this as completed Sep 14, 2021
Chen-jj added a commit that referenced this issue Sep 17, 2021
#10289)

* fix(h5): 修复 h5 下 createAnimation 创建的样式权重过低的问题,fix #10245

* fix(shared): 修复 @tarojs/shared processApis 方法当 config.isOnlyPromisify 为 true 时,错误覆盖部分公共方法 fix #10288

* fix(shared): 提前 isOnlyPromisify 判断,减少空循环

Co-authored-by: chenjiajian <798095202@qq.com>
@ZakaryCode ZakaryCode added this to Done in H5 Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Archived in project
H5
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants