-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Open
Labels
F-reactFramework - ReactFramework - ReactT-weappTarget - 编译到微信小程序Target - 编译到微信小程序V-3Version - 3.xVersion - 3.x
Description
相关平台
微信小程序
复现仓库
https://gitee.com/mychanxw/find-partner.git
小程序基础库: 3.5.5
使用框架: React
复现步骤
实际taro版本为4.0.5
-
taro init 项目后
-
pnpm 添加 @taroify/core
-
在/src/pages/index/index.tsx 文件下添加测试代码
<Button color="primary">测试</Button> <Cell title="单元格">内容</Cell> <Cell title="单元格" brief="描述信息"> 内容 </Cell> -
在 src/app.ts 下引入
import "@taroify/core/index.scss" // 引入taroify全局样式 -
启动 pnpm dev:wxapp 和 pnpm dev:h5
-
微信开发工具项目指定的是根目录 非dist目录
期望结果
h5及微信开发工具可正常渲染taroify样式
实际结果
查看首页-即pages/index页面
h5上显示正常
- 微信小程序开发工具 wxml显示正常,但无样式,绑定的class正确;
- 查看dist内文件
vendors.wxss 内有相关class css内容,但无效果;
环境信息
Taro v4.0.5
Taro CLI 4.0.5 environment info:
System:
OS: macOS 13.6.7
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.17.0 - ~/.n/bin/node
npm: 10.8.2 - ~/.n/bin/npm
npmPackages:
@tarojs/cli: 4.0.5 => 4.0.5
@tarojs/components: 4.0.5 => 4.0.5
@tarojs/helper: 4.0.5 => 4.0.5
@tarojs/plugin-framework-react: 4.0.5 => 4.0.5
@tarojs/plugin-platform-alipay: 4.0.5 => 4.0.5
@tarojs/plugin-platform-h5: 4.0.5 => 4.0.5
@tarojs/plugin-platform-harmony-hybrid: 4.0.5 => 4.0.5
@tarojs/plugin-platform-jd: 4.0.5 => 4.0.5
@tarojs/plugin-platform-qq: 4.0.5 => 4.0.5
@tarojs/plugin-platform-swan: 4.0.5 => 4.0.5
@tarojs/plugin-platform-tt: 4.0.5 => 4.0.5
@tarojs/plugin-platform-weapp: 4.0.5 => 4.0.5
@tarojs/react: 4.0.5 => 4.0.5
@tarojs/runtime: 4.0.5 => 4.0.5
@tarojs/shared: 4.0.5 => 4.0.5
@tarojs/taro: 4.0.5 => 4.0.5
@tarojs/vite-runner: 4.0.5 => 4.0.5
babel-preset-taro: 4.0.5 => 4.0.5
eslint-config-taro: 4.0.5 => 4.0.5
react: ^18.0.0 => 18.3.1
Metadata
Metadata
Assignees
Labels
F-reactFramework - ReactFramework - ReactT-weappTarget - 编译到微信小程序Target - 编译到微信小程序V-3Version - 3.xVersion - 3.x
Type
Projects
Status
Todo