yygongzilib-icon
v2.0.0
Published
规定所有项目的svg icon全部汇总于此
Downloads
2
Readme
SvgIcon
规定所有项目的svg icon全部汇总于此
使用规则
添加svg
将svg文件放置于packages/SvgIcon/svg
目录下,即可直接发布版本,系统会在构建时自动读取packages/SvgIcon/svg
目录下的svg文件,进行处理
svg文件命名
- 因为构建生成的vue组件都是使用的svg文件名,为防止大小写不统一的问题,构建后的vue组件name使用全大写,例如:“CLOSE”
- svg文件名禁止使用或出现中文或特殊字符
处理规则
所有svg统一自动构建成vue组件
安装
- payroll-console 项目内安装
pnpm add SvgIcon -r --filter PersonalIncomeTax
- 通用项目安装
npm add SvgIcon --save
使用/加载
加载
import SvgIcon from 'yygongzilib-icon'
...
components: {
close: SvgIcon.CLOSE
}
...
<close />
基础命令
运行
pnpm run --filter SvgIcon dev
构建
pnpm run --filter SvgIcon build
构建后的文件目录packages/SvgIcon/dist
作为独立项目
本地运行
npm run dev
本地构建
npm run build