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

taro 3.x 使用后,组件内容为空,没有图标节点 #25

Open
trlanfeng opened this issue May 25, 2020 · 4 comments
Open

taro 3.x 使用后,组件内容为空,没有图标节点 #25

trlanfeng opened this issue May 25, 2020 · 4 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@trlanfeng
Copy link

taro 3.x 使用后,组件内容为空,没有图标节点

👽 Taro v3.0.0-rc.0


  Taro CLI 3.0.0-rc.0 environment info:
    System:
      OS: macOS 10.15.4
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 6.13.4 - ~/.nvm/versions/node/v12.16.1/bin/npm
    npmPackages:
      @tarojs/components: 3.0.0-rc.0 => 3.0.0-rc.0
      @tarojs/taro: 3.0.0-rc.0 => 3.0.0-rc.0
      @tarojs/webpack-runner: 3.0.0-rc.0 => 3.0.0-rc.0
      eslint-config-taro: 3.0.0-rc.0 => 3.0.0-rc.0
      react: ^16.10.0 => 16.13.1
@fwh1990 fwh1990 added bug Something isn't working enhancement New feature or request labels May 25, 2020
@jmying
Copy link

jmying commented Jun 17, 2020

2.2.6 同样遇到

@jmying
Copy link

jmying commented Jun 17, 2020

我找到原因了,
file:iconfont.json
{
"trim_icon_prefix": "icon",
}

@fwh1990
Copy link
Member

fwh1990 commented Jul 28, 2020

#28

@fwh1990
Copy link
Member

fwh1990 commented Aug 7, 2020

Hello, taro-iconfont-cli@next已经发布,欢迎使用,唯一需要变更的就是usingComponent

// pages/**/index.config.js

import { useIconFont } from '../../components/iconfont/helper';

export default {
  usingComponents: Object.assign(useIconFont()),
}

不算最好的方案,所以正式版先不发布。有什么更好的建议,欢迎随时反馈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants