birdpaper-icon
Version:
基于 Remix icon 生成的 Vue3 图标组件库
2 lines (1 loc) • 1.23 kB
JavaScript
import{defineComponent as p}from"vue";import{computed as r}from"vue";import{createElementVNode as m,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]=[m("path",{d:"m6.343 14.728-2.828 2.829 3.535 3.535L20.485 7.657 16.95 4.121l-2.121 2.122 1.414 1.414-1.414 1.414-1.415-1.414-2.121 2.121 2.121 2.122L12 13.314 9.88 11.193l-2.122 2.12 1.415 1.415-1.415 1.414-1.414-1.414ZM17.657 2l4.95 4.95a1 1 0 0 1 0 1.414l-14.85 14.85a1 1 0 0 1-1.414 0l-4.95-4.95a1 1 0 0 1 0-1.415L16.243 2a1 1 0 0 1 1.414 0Z"},null,-1)])],14,k)},B=p({name:"IconRulerLine",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-ruler-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};