valaxy icon indicating copy to clipboard operation
valaxy copied to clipboard

`customIcon`在生产环境不生效,但测试环境却是生效

Open MengNianxiaoyao opened this issue 9 months ago • 7 comments

Describe the bug

Image

如图配置

生产环境 Image

测试环境 Image

Reproduction

none

System Info

none

Used Package Manager

pnpm

Validations

  • [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • [x] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • [x] The provided reproduction is a minimal reproducible of the bug.

MengNianxiaoyao avatar Jun 22 '25 15:06 MengNianxiaoyao

添加图标到 unocss.safelist 看看。

YunYouJun avatar Jun 22 '25 17:06 YunYouJun

添加图标到 unocss.safelist 看看。

此方法无效,应用defaultLabels成功

MengNianxiaoyao avatar Jun 23 '25 05:06 MengNianxiaoyao

defaultLabels 是什么

YunYouJun avatar Jun 23 '25 16:06 YunYouJun

defaultLabels 是什么

vitepress-plugin-group-icons的文档中是这样说的:Force specific icons to be loaded regardless of whether they appear in your documentation. 以数组的形式将要使用的图标标签填入defaultLabels会预加载

MengNianxiaoyao avatar Jun 24 '25 05:06 MengNianxiaoyao

使用文件拓展名时依旧构建后无法显示,例如[index.js]不会显示图标只会显示index.js

MengNianxiaoyao avatar Jun 24 '25 05:06 MengNianxiaoyao

听起来需要同时配置 safelist 与 defaultLabels。

文档看起来正常工作。

Image

YunYouJun avatar Jun 24 '25 10:06 YunYouJun

听起来需要同时配置 safelist 与 defaultLabels。

文档看起来正常工作。

Image

safelist可以不用配置,但必须配置defaultLabels才能工作。按照文档的说明groupIcons可以为空也能正常工作的,yun主题却不能正常工作

MengNianxiaoyao avatar Jun 24 '25 10:06 MengNianxiaoyao

似乎还是不行

JasonXuDeveloper avatar Jul 13 '25 02:07 JasonXuDeveloper

theme-yun里修好了,参考https://github.com/YunYouJun/valaxy/pull/569

JasonXuDeveloper avatar Jul 13 '25 03:07 JasonXuDeveloper