birdpaper-icon
Version:
基于 Remix icon 生成的 Vue3 图标组件库
2 lines (1 loc) • 1.16 kB
JavaScript
import{defineComponent as p}from"vue";import{computed as i}from"vue";import{createElementVNode as m,normalizeClass as c,normalizeStyle as u,openBlock as d,createElementBlock as f}from"vue";var k=["fill"],y=function(t,e){return d(),f("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",class:c(t.cls),style:u(t.innerStyle),fill:t.fill,onClick:e[0]||(e[0]=(...n)=>t.onClick&&t.onClick(...n))},[...e[1]||(e[1]=[m("path",{d:"M15 5h2a2 2 0 0 1 2 2v8.17a3.001 3.001 0 1 1-2 0V7h-2v3l-4.5-4L15 2v3ZM5 8.83a3.001 3.001 0 1 1 2 0v6.34a3.001 3.001 0 1 1-2 0V8.83ZM6 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 12a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm12 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"},null,-1)])],14,k)},w=p({name:"IconGitPullRequestLine",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",r=i(()=>[o,`${o}-icon-git-pull-request-line`,{[`${o}-spin`]:e.spin}]),a=i(()=>({width:e.size,height:e.size,transform:e.rotate?`rotate(${e.rotate}deg)`:void 0}));return{cls:r,innerStyle:a,onClick:s=>n("click",s)}}});export{w as default};