Nativescript vue字体图标-图像标记

Nativescript vue字体图标-图像标记,nativescript,nativescript-vue,Nativescript,Nativescript Vue,我已经阅读了nativescript核心文档中的以下代码 <Image src="font://&#xf51e;" stretch="none" class="fas"></Image> 我想使用图像标记来显示图标,但是当我使用NATIVESCRIPT-VUE尝试前面的代码时,什么也没有出现 我的代码如下: <Label text="hola" textWrap="true" /> <Label class="fas" style="fon

我已经阅读了nativescript核心文档中的以下代码

<Image src="font://&#xf51e;" stretch="none" class="fas"></Image>

我想使用图像标记来显示图标,但是当我使用NATIVESCRIPT-VUE尝试前面的代码时,什么也没有出现

我的代码如下:

<Label text="hola" textWrap="true" />
<Label class="fas" style="font-size: 50em; color: red" text.decode="&#xf7aa;" />
<Label class="fas" style="font-size: 50em; color: blue" text.decode="&#xf51e;" />
<Label class="far" style="font-size: 50em; color: orange" text.decode="&#xf2bb;" />
<Label class="fab" style="font-size: 50em; color: black" text.decode="&#xf2b3;" />
<Image src="font://&#xf51e;" stretch="none" class="fas"></Image>

带有标签标签的图标非常完美。但是,带有图标的图像标记不起作用

文档链接:

这是我的项目结构


操场示例:

您缺少
fas的CSS定义

.fas {
    font-family: "Font Awesome 5 Free", "fa-solid-900";
    font-weight: 900;
}
它起作用了

<Label class="fas" style="font-size: 50em; color: red"
                text.decode="&#xf7aa;" />
<Image src.decode="font://&#xf7aa;" stretch="none"
                class="fas">


您缺少
fas的CSS定义

.fas {
    font-family: "Font Awesome 5 Free", "fa-solid-900";
    font-weight: 900;
}
它起作用了

<Label class="fas" style="font-size: 50em; color: red"
                text.decode="&#xf7aa;" />
<Image src.decode="font://&#xf7aa;" stretch="none"
                class="fas">


在我这方面效果非常好,请确保已将字体复制到字体文件夹中。如果您仍然有问题,请共享一个游乐场示例。您正在使用nativescript vue吗?它在nativescript Core中运行良好我只是添加了palyground示例它在我这方面运行良好,请确保您已将字体复制到字体文件夹中。如果您仍然有问题,请共享一个游乐场示例。您正在使用nativescript vue吗?它在nativescript coreI中运行良好,只需添加palyground样本即可。这是真的。我也忘了src.decode。谢谢这是真的。我也忘了src.decode。谢谢