jd-opensource / jd-opensource/taro-ui

taro-ui 无法在京东小程序中使用

Open
#1,034 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.7k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

**问题描述**

编译最新的代码,运行在京东小程序中无法加载组件样式。

**复现步骤**

1. 安装:"@tarojs/taro-jd"
2. 使用京东小程序 build 命令:taro build --type jd
3. 使用京东小程序开发者工具打开 dist/jd/ 输出文件;
4. 查看组件示例,无样式内容;

**期望行为**

可以在京东小程序中正常显示组件。

**报错信息**

无,没有加载到组件对应的样式

**系统信息**

👽 Taro v2.1.6

Taro CLI 2.1.6 environment info:
System:
OS: macOS 10.14.6
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.10.0 - /usr/local/bin/node
Yarn: 1.21.0 - ~/.npm-packages/bin/yarn
npm: 6.14.4 - ~/.npm-packages/bin/npm
npmPackages:
@tarojs/cli: 2.1.6 => 2.1.6
@tarojs/components: 2.1.6 => 2.1.6
@tarojs/mini-runner: 2.1.6 => 2.1.6
@tarojs/plugin-babel: 2.1.6 => 2.1.6
@tarojs/plugin-csso: 2.1.6 => 2.1.6
@tarojs/plugin-sass: 2.1.6 => 2.1.6
@tarojs/plugin-uglifyjs: 2.1.6 => 2.1.6
@tarojs/router: 2.1.6 => 2.1.6
@tarojs/taro: 2.1.6 => 2.1.6
@tarojs/taro-alipay: 2.1.6 => 2.1.6
@tarojs/taro-h5: 2.1.6 => 2.1.5
@tarojs/taro-jd: 2.1.6 => 2.1.6
@tarojs/taro-qq: 2.1.6 => 2.1.6
@tarojs/taro-swan: 2.1.6 => 2.1.6
@tarojs/taro-weapp: 2.1.6 => 2.1.6
@tarojs/webpack-runner: 2.1.6 => 2.1.6
eslint-config-taro: 2.1.6 => 2.1.6
nervjs: ^1.5.6 => 1.5.6

**补充信息**

根据我排查,可能是京东小程序 不支持 addGlobalClass 选项。

static options = {
addGlobalClass: true
}

咱们 taro ui 有办法解决吗,还是需要京东小程序那边去解决?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.