minapp-iconfont

0.0.3 • Public • Published

minapp-iconfont

小程序 iconfont 最佳实践

如何使用

  1. 通过 npm 安装

    npm install minapp-iconfont
  2. 构建

    在开发者工具中点选 工具 - 构建 npm

  3. 下载 Font-class 的 iconfont.css 并重命名为 iconfont.wxss 置于项目根目录下

  4. .json 文件中引入

    {
        "usingComponents": {
            "iconfont": "minapp-iconfont"
        }
    }
  5. .wxml 中使用

    <iconfont icon="name"></iconfont>

属性

  • icon: String

    iconfont 中 font class 的类名,不包括 icon-

    如 iconfont 中存在一个 .icon-name 的类,使用时只需传递 name

    <iconfont icon="name"></iconfont>

更新记录

v0.0.3

Chores:

  • 添加 keywords

Feats:

  • 实现功能

Package Sidebar

Install

npm i minapp-iconfont

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

49.8 kB

Total Files

8

Last publish

Collaborators

  • idan-loo