填充图标
YCloud Icons 目前并不正式支持填充图标。 不过,所有图标都可以接收 SVG 属性。 因此在某些图标上仍然可以使用 fill,并且效果正常。
下面是星级评分的示例:
<script setup> import { Star, StarHalf } from '@ycloud-web/icons-vue'; import './icon.css'; </script> <template> <div class="app"> <div class="star-rating"> <div class="stars"> <Star v-for="i in 5" fill="#111" strokeWidth="0" /> </div> <div class="stars rating"> <Star fill="yellow" strokeWidth="0" /> <Star fill="yellow" strokeWidth="0" /> <StarHalf fill="yellow" strokeWidth="0" />