1 Star 0 Fork 2

Yaohaixiao / icons.toolkit.vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

icons.toolkit.vue

npm version prettier code style vue2 Coverage npm downloads MIT License

icons.toolkit.vue - 专为 icons.js 配套的工具箱。

特点

  • 多款免费且设计优美的图标集;
  • 提供单个 SVG 图标复制和下载;
  • 支持跨图标集选择图标,创建自定义图标集;
  • 支持导入第三方 SVG 图标,创建自定义图标集;
  • 支持打包下载自定义图标集;
  • 支持下载图标集 ES6 模块;

图标集

icons.toolkit.vue 目前以收集了 18 个免费且设计优美的图标集:

  1. @yaohaixiao/icons.toolkit.vue/assets/brankic
  2. @yaohaixiao/icons.toolkit.vue/assets/broccolidry
  3. @yaohaixiao/icons.toolkit.vue/assets/eighty-shades
  4. @yaohaixiao/icons.toolkit.vue/assets/entypo
  5. @yaohaixiao/icons.toolkit.vue/assets/ever-icons
  6. @yaohaixiao/icons.toolkit.vue/assets/feather
  7. @yaohaixiao/icons.toolkit.vue/assets/font-awesome
  8. @yaohaixiao/icons.toolkit.vue/assets/hawcons
  9. @yaohaixiao/icons.toolkit.vue/assets/iconic
  10. @yaohaixiao/icons.toolkit.vue/assets/linecons
  11. @yaohaixiao/icons.toolkit.vue/assets/material
  12. @yaohaixiao/icons.toolkit.vue/assets/meteocons
  13. @yaohaixiao/icons.toolkit.vue/assets/steadysets
  14. @yaohaixiao/icons.toolkit.vue/assets/typicons
  15. @yaohaixiao/icons.toolkit.vue/assets/vicons
  16. @yaohaixiao/icons.toolkit.vue/assets/wpzoom
  17. @yaohaixiao/icons.toolkit.vue/assets/zondicons
  18. @yaohaixiao/icons.toolkit.vue/assets/icons

Usage

icons.toolkit.vue 是 icons.js 配套的工具箱,是其中使用的 BaseIcon 图标组件和图标集绘制功能都是基于 icons.js 提供的功能开发的。

纯 ES6 开发

// 导入 icons.js 中可以直接使用的 symbols 数据
import ICONS from '@yaohaixiao/icons.toolkit.vue/assets/brankic/icons'

// 导入 icons.js 的功能函数
import paint from '@yaohaixiao/icons.js/paint'
import icon from '@yaohaixiao/icons.js/icon'

// 绘制 svg sprites 图标集
paint(ICONS)

// 创建 svg 图标的 DOM 元素
const $icon = icon('up')
// 将图标绘制到指定的按钮内
document.querySelector('#button__up').appendChild($icon)

VUE 开发

<template>
  <icon name="up" :size="32" />
</template>
// 导入 icons.js 中可以直接使用的 symbols 数据
import ICONS from '@yaohaixiao/icons.js-toolkit/assets/brankic/icons'
// 导入 icons.js 的 Icon 组件
import Icon from '@yaohaixiao/icons.js/components/Icon'

// 绘制 svg sprites 图标集
paint(ICONS)

export default {
  name: 'XXXPage',
  components: {
    Icon
  },
  // ... 省略其他
}

导入图标集

icons.js-toolkit 中除了提供 symbols 数组格式的数据,还有图标集:

// 导入图标
import BRANKIC from '@yaohaixiao/icons.js-toolkit/assets/brankic'

其数据格式如下:

// 导入图标
import ICONS from './icons'

const BRANKIC = {
  title: 'Brankic 1979 图标集',
  designer: 'Brankic1979',
  homepage: 'http://brankic1979.com/icons/',
  license: 'Custom (Free to use)',
  code: 'brankic',
  symbols: ICONS
}

License

JavaScript Code Licensed under MIT License.

API Documentation Licensed under CC BY 3.0

MIT License Copyright (c) 2023 姚海啸 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

icons.toolkit.vue - 专为 icons.js 配套的工具箱。 展开 收起
JavaScript 等 4 种语言
MIT
取消

发行版 (3)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/yaohaixiao/icons.toolkit.vue.git
git@gitee.com:yaohaixiao/icons.toolkit.vue.git
yaohaixiao
icons.toolkit.vue
icons.toolkit.vue
main

搜索帮助

344bd9b3 5694891 D2dac590 5694891