UNPKG

birdpaper-icon

Version:

基于 Remix icon 生成的 Vue3 图标组件库

40 lines (39 loc) 1.01 kB
import { defineComponent, computed } from "vue"; const _sfc_main = defineComponent({ name: "IconProgress8Fill", props: { /** 图标尺寸 */ size: { type: String, default: "18px" }, /** 颜色 */ fill: { type: String, default: "#595959" }, /** 旋转角度 */ rotate: { type: Number }, /** 是否旋转 */ spin: { type: Boolean } }, emits: { click: (ev) => true }, setup(props, { emit }) { const name = "bp-icon"; const iconClass = computed(() => [name, `${name}-progress-8-fill`, { [`${name}-spin`]: props.spin }]); const innerStyle = computed(() => { const styles = {}; props.size && (styles.width = props.size); props.size && (styles.height = props.size); props.rotate && (styles.transform = `rotate(${props.rotate}deg)`); return styles; }); const onClick = (ev) => { emit("click", ev); }; return { iconClass, innerStyle, onClick }; } }); export { _sfc_main as default };