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

通过object类型传入的styles,无法删除某个属性 #8246

Closed
rookie125 opened this issue Dec 11, 2020 · 2 comments
Closed

通过object类型传入的styles,无法删除某个属性 #8246

rookie125 opened this issue Dec 11, 2020 · 2 comments
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@rookie125
Copy link

相关平台

H5

浏览器版本: chrome 87
使用框架: React

复现步骤

打开链接 https://codesandbox.io/s/vigorous-voice-e9ofy?file=/src/App.js 点击页面的 "设置/新增 border" 按钮

期望结果

styles整个对象被更新

实际结果

跟styles对象做了个merge操作

环境信息

Taro CLI 2.2.6 environment info:
    System:
      OS: macOS 10.14.6
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.16.3 - /usr/local/bin/node
      Yarn: 1.17.3 - /usr/local/bin/yarn
      npm: 6.9.0 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: 2.2.6 => 2.2.6 
      @tarojs/components-qa: 2.2.6 => 2.2.6 
      @tarojs/mini-runner: 2.2.6 => 2.2.6 
      @tarojs/mobx: 2.2.6 => 2.2.6 
      @tarojs/mobx-h5: 2.2.6 => 2.2.6 
      @tarojs/router: 2.2.6 => 2.2.6 
      @tarojs/taro: 2.2.6 => 2.2.6 
      @tarojs/taro-alipay: 2.2.6 => 2.2.6 
      @tarojs/taro-h5: 2.2.6 => 2.2.6 
      @tarojs/taro-weapp: 2.2.6 => 2.2.6 
      @tarojs/webpack-runner: 2.2.6 => 2.2.6 
      eslint-config-taro: 2.2.6 => 2.2.6 
      eslint-plugin-taro: 2.2.6 => 2.2.6 
      nerv-devtools: ^1.5.6 => 1.5.7 
      nervjs: ^1.5.6 => 1.5.7

补充信息

问题出在这个NervJS/taro/blob/next/packages/taro-components/h5/react/utils/reactify-wc.js文件的第 59 行代码

@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Dec 11, 2020
@iamxyzby
Copy link

相同的问题。

@Chen-jj
Copy link
Contributor

Chen-jj commented Apr 27, 2021

Taro 3.2.6 已修复,此 PR 帮助优化了 props 的 diff 逻辑~

@Chen-jj Chen-jj closed this as completed Apr 27, 2021
@ZakaryCode ZakaryCode moved this to Done in H5 Apr 10, 2023
@ZakaryCode ZakaryCode added this to H5 Apr 10, 2023
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
Development

No branches or pull requests

3 participants