Git Product home page Git Product logo

svg-icon-preview's Introduction

SVG 图标预览管理插件

项目配置

在项目.vscode 目录下新增 iconConfig.json 文件
配置内容如下:

字段 类型 说明
name string 项目根目录
iconPath string 注册图标的文件路径
iconDir string 图标存储的路径

示例:

[
  {
    "name": "packages/amis-ui",
    "iconPath": "packages/amis-ui/src/components/icons.tsx",
    "iconDir": "packages/amis-ui/src/icons"
  },
  {
    "name": "packages/amis-editor",
    "iconPath": "packages/amis-editor/src/icons/index.tsx",
    "iconDir": "packages/amis-editor/src/icons"
  },
  {
    "name": "packages/amis-editor-core",
    "iconPath": "packages/amis-editor-core/src/icons/index.tsx",
    "iconDir": "packages/amis-editor-core/src/icons"
  }
]

使用说明

图标预览

安装完插件和配置完项目后,重启 vscode,点击侧边栏图标
image
或者,在文件下点击图标列表
image\

编辑不同 package 的文件,图标列表会对应展示该 package 下支持的图标
如果图标名称为红色,表明该图标存在文件夹中但是没有被项目引用

使用图标

点击图标,即可复制该图标相应代码

管理图标

右键图标呼出菜单
image

  1. 查看文件:查看对应 svg 原文件
  2. 删除:删除 svg 原文件和引入,需二次确认

其他功能

image

  1. 点击文件图标:打开对应图标列表的图标注册文件
  2. 点击刷新图标:重新加载图标列表内容

svg-icon-preview's People

Contributors

qkiroc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.