川歌
川歌
  • 发布:2020-11-18 10:52
  • 更新:2023-08-03 16:16
  • 阅读:2935

【报Bug】uni-ui通过配置easycom打包app后uni-icons看不到图标

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win10 64位

HBuilderX类型: 正式

HBuilderX版本号: 2.9.8

手机系统: Android

手机系统版本号: Android 8.0

手机厂商: 华为

手机机型: 所有手机

页面类型: vue

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:

上述代码

预期结果:

希望uni-icons正常显示

实际结果:

uni-icons显示不正常

bug描述:

uni-ui通过配置easycom打包app后uni-icons看不到图标,只显示一个框框,应该是字体没有加载
开发环境正常,自定义基座运行正常,就打包正式版后就不显示icon
easycom的配置:

    "easycom": {  
        "autoscan": true,  
        "custom": {  
            "^uni-((?!(shadow-root)).*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue" //这里排除了uni-shadow-root  
        }  
    }

页面使用组件:图标看不到

<uni-icons class="icon" type="locked" size="24" />

如果在easycom排除uni-icons,把uni-icons复制到\components目录下就正常
easycom的配置:

    "easycom": {  
        "autoscan": true,  
        "custom": {  
            "^uni-((?!(shadow-root|icons)).*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue" //这里排除了uni-shadow-root,uni-icons  
        }  
    }
2020-11-18 10:52 负责人:无 分享
已邀请:
清枫呢喃

清枫呢喃

同个问题.我也是npm的,也排除了 shadow-root
icons真机调试正常,打包后不显示~

laravuel

laravuel

同样的问题,我也是npm下的uni组件库,然后通过easycom加载,基座啥的图标都正常显示,打包发布后图标就不显示了。

坑爹。
uni组件库版本1.2.5

h***@163.com

h***@163.com

我也出现这样的问题,怎么解决?

laravuel

laravuel

这个问题,官方难道都不重视吗?

  • 川歌 (作者)

    可以把uni-icons也排除掉,然后把uni-icons复制到components目录

    2021-06-08 13:38

y***@126.com

y***@126.com

我也遇到这个问题,请问大家有解决方法吗

3***@qq.com

3***@qq.com

同问题,大家解决了吗

[已删除]

[已删除]

我的按照上面的忽略了,图标还是一个叉叉,怎么整,要崩溃了

要回复问题请先登录注册