feat: 更新图标组件和Vite配置以支持自定义类名
All checks were successful
/ playwright (push) Successful in 2m5s
/ depcheck (push) Successful in 1m54s
/ build-and-deploy-to-vercel (push) Successful in 1m25s

This commit is contained in:
严浩
2024-12-04 14:00:24 +08:00
parent 2479c80cd1
commit ce2f1f6a27
2 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,7 @@
<div b="1px solid pink">
<div>pacman.svg</div>
<icon-svg-pacman text-blue w-48 h-48 />
<icon-svg:pacman text-blue w-48 h-48 />
<some-icon text-cyan w-48 h-48 />
</div>
</div>

View File

@ -88,6 +88,9 @@ export function Plugins() {
return svg.replace(/^<svg /, '<svg fill="currentColor" ');
}),
},
iconCustomizer(collection, icon, props) {
props.class = 'unplugin-icons';
},
}),
);