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

Textarea组件,以及Picke组件失效,渲染成了其他组件,且控制台有看不懂的报错 #12800

Closed
sorryljt opened this issue Nov 10, 2022 · 10 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@sorryljt
Copy link

相关平台

微信小程序

复现仓库

https://github.com/sorryljt/taroweapp.git
小程序基础库: 3.5.6
使用框架: React

复现步骤

直接启动,页面入口:pages/outPlan/index;其中“推荐理由”和“附加费用”两个表单项,为TextArea组件,未被渲染出来,在我本地甚至还渲染成了Switch组件;“办理时效”,“还款方式”为Picker组件,也未被渲染出来。在页面的Input组件输入时,控制台还有连续的黄色警告,看不懂,

期望结果

期望按照预期渲染

实际结果

未按照预期渲染

环境信息

Taro v3.5.6


  Taro CLI 3.5.6 environment info:
    System:
      OS: macOS 12.6
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
      Yarn: 1.22.10 - /usr/local/bin/yarn
      npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.5.6 => 3.5.6 
      @tarojs/components: 3.5.6 => 3.5.6 
      @tarojs/helper: 3.5.6 => 3.5.6 
      @tarojs/mini-runner: ^3.5.6 => 3.5.6 
      @tarojs/plugin-framework-react: 3.5.6 => 3.5.6 
      @tarojs/plugin-platform-weapp: ^3.5.6 => 3.5.7 
      @tarojs/react: 3.5.6 => 3.5.6 
      @tarojs/router: 3.5.6 => 3.5.6 
      @tarojs/runtime: 3.5.6 => 3.5.6 
      @tarojs/shared: 3.5.6 => 3.5.6 
      @tarojs/taro: 3.5.6 => 3.5.6 
      @tarojs/taro-h5: 3.5.6 => 3.5.6 
      @tarojs/webpack5-runner: 3.5.6 => 3.5.6 
      babel-preset-taro: 3.5.6 => 3.5.6 
      eslint-config-taro: 3.5.6 => 3.5.6 
      react: ^18.2.0 => 18.2.0 
      taro-ui: ^3.1.0-beta.4 => 3.1.0-beta.4 
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Nov 10, 2022
@AdvancedCat
Copy link
Member

请升级至 v3.5.7 版本即可

此外, config/index.js 需要设置 compiler: "webpack5"

@AdvancedCat
Copy link
Member

image

@sorryljt
Copy link
Author

多谢,已解决

@sorryljt
Copy link
Author

方便的话,可以说明下原因。是什么导致了组件的渲染错乱

@AdvancedCat
Copy link
Member

#12558

你说的连续的黄色告警,就是这个吧?

@sorryljt
Copy link
Author

是这个,不过更令我好奇的是,为什么组件的渲染会发生错乱,在我本地,Textarea竟然被渲染成了switch组件,而switch被渲染成了swiper item

@AdvancedCat
Copy link
Member

base.wxml 是模板集合,应该是 template name 匹配到了错误模板

@sorryljt
Copy link
Author

base.wxml 是模板集合,应该是 template name 匹配到了错误模板

或许...不过奇怪的是,相关依赖并没有进行过升级,团队成员正常开发 merge;忽然就出现了这个问题,有点一时不知所措

@zhiqingchen
Copy link
Member

zhiqingchen commented Nov 10, 2022

那应该是 @tarojs/plugin-platform-weapp: ^3.5.6 导致的,更新到了 3.5.7
其他依赖是锁定版本的

@sorryljt
Copy link
Author

那应该是 @tarojs/plugin-platform-weapp: ^3.5.6 导致的,更新到了 3.5.7
其他依赖是锁定版本的

好的,多谢解惑

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

No branches or pull requests

3 participants