简体   繁体   English

在 ExtJS 6 中 Fontawesome 升级后没有图标

[英]No Icons after Fontawesome upgrade in ExtJS 6

I have Sencha ExtJS 6 and some of new FontAwesome icons didn't work out.我有 Sencha ExtJS 6 和一些新的 FontAwesome 图标没有工作。 I thought it is due to old version of FontAwesome.我认为这是由于旧版本的 FontAwesome。 Then I decided to upgrade it and I followed this tutorial: https://github.com/yamayamayamaji/extjs-package-fontawesome which says:然后我决定升级它,并按照本教程进行操作: https : //github.com/yamayamaji/extjs-package-fontawesome其中说:

Replace your /ext(framework_dir)/packages/font-awesome/ with /font-awesome/用 /font-awesome/ 替换你的 /ext(framework_dir)/packages/font-awesome/

then run sencha app refresh然后运行sencha app refresh

But after this I cannot see any of FontAwesome icons.但在此之后我看不到任何 FontAwesome 图标。

So this:所以这:

{
    title: 'Dashboard',
    iconCls: 'fa-home',
    bind:
    {
        html: 'Test'
    }

},

now looks like this:现在看起来像这样:

在此处输入图片说明

Any suggestions?有什么建议?

Btw I don't have any errors in Console.顺便说一句,我在控制台中没有任何错误。

The fontCls parameter is missing.缺少fontCls参数。

In ExtJS 6, iconCls is specified with the following notation:在 ExtJS 6 中, iconCls使用以下符号指定:

iconCls: '{fontCls} {iconPrefix}-{iconName}'

So, rather than just fa-home , try specifying x-fa fa-home , as below:因此,而不是仅仅fa-home ,尝试指定x-fa fa-home ,如下所示:

iconCls: 'x-fa fa-home'

可用的 ExtJS 字体包

https://docs.sencha.com/extjs/6.0.2/guides/core_concepts/font_ext.html https://docs.sencha.com/extjs/6.0.2/guides/core_concepts/font_ext.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM