UNPKG

birdpaper-icon

Version:

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

2 lines (1 loc) 1.2 kB
import{defineComponent as m}from"vue";import{computed as i}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:"M18.364 15.536 16.95 14.12l1.414-1.414a5 5 0 0 0-7.071-7.071L9.878 7.05 8.464 5.636l1.414-1.414a7 7 0 0 1 9.9 9.9l-1.414 1.414Zm-2.829 2.828-1.414 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 0 0 7.07 7.071l1.415-1.414 1.414 1.414Zm-.707-10.607 1.415 1.415-7.072 7.07-1.414-1.414 7.071-7.07Z"},null,-1)])],14,k)},B=m({name:"IconLink",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",r=i(()=>[l,`${l}-icon-link`,{[`${l}-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{B as default};