birdpaper-icon
Version:
基于 Remix icon 生成的 Vue3 图标组件库
2 lines (1 loc) • 1.45 kB
JavaScript
import{defineComponent as c}from"vue";import{computed as r}from"vue";import{createElementVNode as p,normalizeClass as m,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:m(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:"M12.5 2a.5.5 0 0 0-.5.5V12h-2V4.5a.5.5 0 0 0-1 0V14H7c-.38-1.62-1.358-2.56-2.405-2.678.284.744.766 1.937 1.571 3.778.86 1.962 1.725 3.422 2.838 4.399C10.078 20.442 11.459 21 13.5 21a5.5 5.5 0 0 0 5.5-5.5V7a.5.5 0 0 0-1 0v5h-2V4a.5.5 0 0 0-1 0v8h-2V2.5a.5.5 0 0 0-.5-.5ZM21 15.5a7.5 7.5 0 0 1-7.5 7.5c-2.458 0-4.328-.692-5.816-1.998-1.45-1.274-2.459-3.064-3.35-5.1-.93-2.127-1.444-3.422-1.724-4.178-.357-.964.136-2.312 1.476-2.406a4.02 4.02 0 0 1 2.914.94V4.5a2.5 2.5 0 0 1 3.04-2.442 2.5 2.5 0 0 1 4.79-.467A2.502 2.502 0 0 1 18 4v.55A2.5 2.5 0 0 1 21 7v8.5Z"},null,-1)])],14,k)},h=c({name:"IconHand",render:y,props:{size:{type:String,default:"18px"},fill:{type:String,default:"#595959"},spin:{type:Boolean,default:!1},rotate:{type:Number}},emits:["click"],setup(l,{emit:t}){let e=l,n=t,o="bp-icon",i=r(()=>[o,`${o}-icon-hand`,{[`${o}-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{h as default};