0

嗨,我喜欢使用一些字体很棒的图标,例如 Twitter 图标。

在我的 nuxt.config.js 中,我有以下几行:

fontawesome: {
component: "fa",
icons: {
  solid: true,
  brands: true
 }
},

在 html 中,我在下面有这些行:

  <fa icon="envelope"></fa>
  <fa icon="twitter"></fa>

但是,信封可以显示但不能显示 Twitter 图标。我想念什么吗?

4

1 回答 1

0

在 html 中指定图标的正确方法应该是:

  <fa :icon="['fas', 'envelope']" />
  <fa :icon="['fas', 'lock']" />
  <fa :icon="['fas', 'sign-in-alt']" />
  <fa :icon="['fab', 'google']" />
  <fa :icon="['fab', 'linkedin']" />
  <fa :icon="['fab', 'twitch']" />
于 2020-10-06T14:26:15.807 回答