birdpaper-icon
Version:
基于 Remix icon 生成的 Vue3 图标组件库
2 lines (1 loc) • 1.45 kB
JavaScript
import{defineComponent as c}from"vue";import{computed as i}from"vue";import{createElementVNode as p,normalizeClass as m,normalizeStyle as d,openBlock as f,createElementBlock as u}from"vue";var C=["fill"],k=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:"M15.5.287c-.69.286-1.359.616-2 .987C8.419 4.215 5 9.708 5 16H4v4H3v2h17v-2h-1v-4h-1.192a5.413 5.413 0 0 0-.76-1.85c-.566-.858-1.421-1.562-2.658-2.131-.13-.06-.263-.117-.396-.172a.174.174 0 0 1-.059-.282c.055-.055.122-.053.192-.04l1.753.351 2.413.483a1 1 0 0 0 1.065-.485l1.295-2.266a1 1 0 0 0-.105-1.142L15.5 2.5V.287ZM17 20H6v-2h11v2ZM7 16c0-5.22 2.668-9.822 6.719-12.509l4.85 5.732-.59 1.033-3.497-.7a2.17 2.17 0 0 0-1.96.594c-1.133 1.133-.676 2.977.713 3.547 1.246.513 1.859 1.082 2.2 1.642.118.193.22.41.303.661H7Zm7-8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"},null,-1)])],14,C)},z=c({name:"IconChessLine",render:k,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-chess-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{z as default};