vue怎么直接嵌入svg_使用嵌入式SVG的Vue.js的Font Awesome组件

vue怎么直接嵌入svg

Vue很棒 (Vue-Awesome)

Awesome SVG icon component for Vue.js, with built-in Font Awesome icons.

Vue.js的超赞SVG图标组件,带有内置的Font Awesome图标。

Vue-Awesome an SVG icon component for Vue.js, with built-in icons courtesy of Font Awesome.

Vue-Awesome Vue.js的SVG图标组件,内置图标由Font Awesome提供。

安装 (Installation)

npm(推荐) (npm (Recommended))

$ npm install vue-awesome

凉亭 (bower)

$ bower install vue-awesome

手册 (Manual)

Just download dist/vue-awesome.js and include it in your HTML file:

只需下载dist/vue-awesome.js并将其包含在您HTML文件中即可:

<script src="path/to/vue-awesome/dist/vue-awesome.js"></script>

用法 (Usage)

<!-- basic -->
<v-icon name="beer"/>

<!-- with options -->
<v-icon name="sync" scale="2" spin/>
<v-icon name="comment" flip="horizontal"/>
<v-icon name="code-branch" label="Forked Repository"/>

<!-- stacked icons -->
<v-icon label="No Photos">
  <v-icon name="camera"/>
  <v-icon name="ban" scale="2" class="alert"/>
</v-icon>

Font Awesome 5 has separated all icons into several packs. Vue-Awesome is built upon its all free icons, which includes all free icons from 3 icon packs: regular, solid and brands. Since the solid pack has the most number of icons, we organize all Vue-Awesome icons as follows:

Font Awesome 5将所有图标分为几个包。 Vue-Awesome建立在其所有免费图标的基础上,其中包括3个图标包中的所有免费图标: regularsolidbrands 。 由于solid pack的图标数量最多,因此我们按以下方式组织所有Vue-Awesome图标:

  • All icons from solid pack are located in vue-awesome/icons directory and have unprefixed name prop values.

    solid pack中的所有图标都位于vue-awesome/icons目录中,并且具有未前缀的name prop值。

  • Icons from regular and brands are located in vue-awesome/icons/regular and vue-awesome/icons/brands, which have prefixed name prop values like regular/flag or brands/reddit.

    regularbrands图标位于vue-awesome/icons/regularvue-awesome/icons/brands ,它们具有前缀name属性值,例如regular/flagbrands/reddit

You can find all available name values from Font Awesome's website like beer, file and camera.

您可以从Font Awesome网站上找到所有可用的name值,例如beerfile

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值