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

如何编写一个微信小程序的的自定义组件,即页面编译后的index.js中的Page字段应生成为Component的形式 #15525

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

Comments

@Machiavellid
Copy link

相关平台

微信小程序

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

复现步骤

使用脚手架创建一个项目,编译运行

期望结果

index.js中的Page字段应为Component,同时应将配置转化为Component需要的配置形式

实际结果

无法生成微信小程序中的Component

环境信息

👽 Taro v3.6.24


  Taro CLI 3.6.24 environment info:
    System:
      OS: Windows 11 10.0.22621
    Binaries:
      Node: 16.16.0 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
      npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: 3.6.24 => 3.6.24 
      @tarojs/components: 3.6.24 => 3.6.24 
      @tarojs/helper: 3.6.24 => 3.6.24
      @tarojs/plugin-framework-react: 3.6.24 => 3.6.24
      @tarojs/plugin-platform-alipay: 3.6.24 => 3.6.24
      @tarojs/plugin-platform-h5: 3.6.24 => 3.6.24
      @tarojs/plugin-platform-jd: 3.6.24 => 3.6.24
      @tarojs/plugin-platform-qq: 3.6.24 => 3.6.24
      @tarojs/plugin-platform-swan: 3.6.24 => 3.6.24
      @tarojs/plugin-platform-tt: 3.6.24 => 3.6.24
      @tarojs/plugin-platform-weapp: 3.6.24 => 3.6.24
      @tarojs/react: 3.6.24 => 3.6.24
      @tarojs/runtime: 3.6.24 => 3.6.24
      @tarojs/shared: 3.6.24 => 3.6.24
      @tarojs/taro: 3.6.24 => 3.6.24
      @tarojs/taro-loader: 3.6.24 => 3.6.24
      @tarojs/webpack5-runner: 3.6.24 => 3.6.24
      babel-preset-taro: 3.6.24 => 3.6.24
      eslint-config-taro: 3.6.24 => 3.6.24
      react: ^18.0.0 => 18.2.0

补充信息

https://developers.weixin.qq.com/miniprogram/dev/reference/api/Component.html

@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Apr 17, 2024
@Machiavellid Machiavellid reopened this Apr 17, 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
Archived in project
Development

No branches or pull requests

1 participant