birdpaper-icon
Version:
基于 Remix icon 生成的 Vue3 图标组件库
2 lines (1 loc) • 1.52 kB
JavaScript
import{defineComponent as m}from"vue";import{computed as r}from"vue";import{createElementVNode as p,normalizeClass as c,normalizeStyle as d,openBlock as f,createElementBlock as u}from"vue";var k=["fill"],y=function(t,e){return f(),u("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",class:c(t.cls),style:d(t.innerStyle),fill:t.fill,onClick:e[0]||(e[0]=(...n)=>t.onClick&&t.onClick(...n))},[...e[1]||(e[1]=[p("path",{d:"M19.243 4.757a5.998 5.998 0 0 1 1.65 5.38c.568.16 1.106.463 1.554.908a3.55 3.55 0 0 1 0 5.047L17 21.5l-3.022-3L11 21.485 2.52 12.993a6 6 0 0 1 8.48-8.464 5.998 5.998 0 0 1 8.242.228Zm-6.281 7.708a1.55 1.55 0 0 0 0 2.208L17 18.682l4.038-4.009a1.55 1.55 0 0 0 0-2.208 1.614 1.614 0 0 0-2.268.002l-1.772 1.754-1.407-1.396-.363-.36a1.613 1.613 0 0 0-2.266 0Zm-8.79-6.293a4 4 0 0 0-.192 5.451L11 18.654l1.559-1.562-1.006-1a3.55 3.55 0 0 1 0-5.047 3.614 3.614 0 0 1 5.084 0l.363.36.363-.36a3.584 3.584 0 0 1 1.465-.882 4.003 4.003 0 0 0-1.001-3.993 3.998 3.998 0 0 0-5.49-.153l-1.335 1.198-1.336-1.197a4 4 0 0 0-5.494.154Z"},null,-1)])],14,k)},B=m({name:"IconHeartsLine",render:y,props:{size:{type:String,default:"18px"},fill:{type:String,default:"#595959"},spin:{type:Boolean,default:!1},rotate:{type:Number}},emits:["click"],setup(o,{emit:t}){let e=o,n=t,l="bp-icon",i=r(()=>[l,`${l}-icon-hearts-line`,{[`${l}-spin`]:e.spin}]),a=r(()=>({width:e.size,height:e.size,transform:e.rotate?`rotate(${e.rotate}deg)`:void 0}));return{cls:i,innerStyle:a,onClick:s=>n("click",s)}}});export{B as default};