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

微信自定义组件无法正常获取到传递的props参数 #15507

Open
jijiaxin1808 opened this issue Apr 14, 2024 · 0 comments
Open

微信自定义组件无法正常获取到传递的props参数 #15507

jijiaxin1808 opened this issue Apr 14, 2024 · 0 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@jijiaxin1808
Copy link

相关平台

微信小程序

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

复现步骤

重现链接:https://github.com/jijiaxin1808/taro_issue_template

  1. 执行yarn watch:weapp编译项目
  2. 在微信小程序开发者工具中打开

期望结果

  1. 项目正常渲染
  2. 首页中引入的小程序自定义组件可以正常打印出props参数

实际结果

  1. 编译出错,报错error: module 'common.js' is not defined, require args is './common(这里编译出错需要把dist路径下的相关报错文件中的require("../../common");代码注释掉后可正常使用)
  2. 小程序自定义组件中打印props无法正常获取到props

环境信息

  Taro CLI 3.6.26 environment info:
    System:
      OS: macOS 13.4
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 16.20.1 - /usr/local/bin/node
      Yarn: 1.22.19 - /usr/local/bin/yarn
      npm: 8.19.4 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.25 => 3.6.25 
      @tarojs/components: 3.6.25 => 3.6.25 
      @tarojs/helper: 3.6.25 => 3.6.25 
      @tarojs/plugin-framework-react: 3.6.25 => 3.6.25 
      @tarojs/plugin-platform-alipay: 3.6.25 => 3.6.25 
      @tarojs/plugin-platform-h5: 3.6.25 => 3.6.25 
      @tarojs/plugin-platform-jd: 3.6.25 => 3.6.25 
      @tarojs/plugin-platform-qq: 3.6.25 => 3.6.25 
      @tarojs/plugin-platform-swan: 3.6.25 => 3.6.25 
      @tarojs/plugin-platform-tt: 3.6.25 => 3.6.25 
      @tarojs/plugin-platform-weapp: 3.6.25 => 3.6.25 
      @tarojs/react: 3.6.25 => 3.6.25 
      @tarojs/runtime: 3.6.25 => 3.6.25 
      @tarojs/shared: 3.6.25 => 3.6.25 
      @tarojs/taro: 3.6.25 => 3.6.25 
      @tarojs/taro-loader: 3.6.25 => 3.6.25 
      @tarojs/webpack5-runner: 3.6.25 => 3.6.25 
      babel-preset-taro: 3.6.25 => 3.6.25 
      eslint-config-taro: 3.6.25 => 3.6.25 
      react: ^18.0.0 => 18.2.0
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Apr 14, 2024
This was referenced Apr 20, 2024
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
Status: Todo
Development

No branches or pull requests

1 participant