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如何引入icomoon的字体图标,引入之后[class='icon-']这样的属性taro不支持,有什么办法可以转换吗? #1141

Closed
xcs-go opened this issue Nov 15, 2018 · 7 comments

Comments

@xcs-go
Copy link

xcs-go commented Nov 15, 2018

如果是提交 bug,请搜索文档和 issue,确认以下事项:

  • 该问题没有在其他 issue 和文档讨论到,不属于重复内容

  • 分割线以下的模板除了「 补充信息」每一样都必填

如果不满足以上两点要求的 bug 报告,issue 会被直接关掉。

请多多理解,您现在的不便将会使 Taro 开发者更高效地定位你的问题,修复你的问题。像你一样的 Taro 的使用者也可以通过搜索找到你提供的 bug,对各方都有很大好处。

🙏🙏🙏
阅读完后请在提交的issue中删除以上内容,包括分割线。

问题描述
[问题描述:站在其它人的角度尽可能清晰地、简洁地把问题描述清楚]

复现步骤
[复现问题的步骤]

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

[或者可以直接贴源代码,能贴文字就不要截图]

// 这里可以贴代码

期望行为
[这里请用简洁清晰的语言描述你期望的行为]

报错信息

[这里请贴上你的完整报错截图或文字]

系统信息

  • 操作系统: [e.g. Windows 10]
  • Taro 版本 [e.g. v.0.0.64]
  • Node.js 版本 [e.g. v9.0.0]
  • 报错平台 [h5, weapp]

补充信息
[可选]
[根据你的调查研究,出现这个问题的原因可能在哪里?]

@luckyadam
Copy link
Member

写 className

@xcs-go
Copy link
Author

xcs-go commented Nov 19, 2018

@luckyadam 把所有需要的字体图标都重新用className写一遍?

@luckyadam
Copy link
Member

@xcs-go
Copy link
Author

xcs-go commented Nov 19, 2018

@luckyadam 好的,我试试。谢谢

@callmewhy
Copy link

你好

<AtIcon prefixClass='icomoon' value='tab_zy_lan' size='30' color='#F00'></AtIcon>

这种写法有问题吗,似乎并不能成功加载。css 里设置了 font family

@luckyadam
Copy link
Member

@callmewhy 贴一下代码

@callmewhy
Copy link

callmewhy commented Nov 30, 2018

倒腾成功了,icomoon icon + Taro 完美适配,哈哈

主要是 icomoon 自带的 [class='icon-']不行,需要改成 .icon {} 的形式。其他一切正常,tabbar 中也可以使用

@yuche yuche added the resolved label Apr 8, 2019
@yuche yuche closed this as completed Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants