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

使用@tarojs/plugin-html时,html标签与组件共存时,同名组件会被加入class等处理 #11487

Closed
spiritree opened this issue Mar 21, 2022 · 2 comments · Fixed by #11516
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Milestone

Comments

@spiritree
Copy link
Contributor

相关平台

微信小程序

小程序基础库: whatever
使用框架: React

复现步骤

使用html标签与组件共存
image

期望结果

非html标签不作任何处理

实际结果

同名组件会被加入class等处理,如textarea的class被加入h5-textarea样式

环境信息

Taro CLI 3.4.3 environment info:
    System:
      OS: macOS 12.2.1
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
      Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.0/bin/yarn
      npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.4.3 => 3.4.3 
      @tarojs/components: 3.4.3 => 3.4.3 
      @tarojs/mini-runner: 3.4.3 => 3.4.3 
      @tarojs/react: 3.4.3 => 3.4.3 
      @tarojs/runtime: 3.4.3 => 3.4.3 
      @tarojs/taro: 3.4.3 => 3.4.3 
      @tarojs/webpack-runner: 3.4.3 => 3.4.3 
      babel-preset-taro: 3.4.3 => 3.4.3 
      react: ^17.0.0 => 17.0.2 
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Mar 21, 2022
@spiritree
Copy link
Contributor Author

if (!isHtmlTags(nodeName)) return

这个判断有缺陷,同名组件就会被执行,有什么好解决的方法吗 @Chen-jj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants