ruoyi-plus-soybean/build/plugins/iconify.ts

17 lines
738 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import ViteIcons, { ViteIconsResolver } from 'vite-plugin-icons'; // iconify图标
import Components from 'vite-plugin-components'; // 从指定目录自动导入组件
export default [
Components({
customComponentResolvers: ViteIconsResolver({ componentPrefix: 'icon' }) // 组件名前缀
}),
ViteIcons()
];
/**
* iconify用法(安装对应的vscode智能提示的插件: Iconify IntelliSense)
* 找图标:网址 https://icones.js.org/ 或者 vscode安装 icones插件
* 确定图标名字:找到图标后复制名字 如mdi:ab-testing 组件为: <icon-mdi-ab-testing />
* 样式同html标签一样直接应用style属性或者class属性; 通过设置color和font-size属性设置对应的颜色和大小
*/