UNPKG

@fe6/icon-cube-vue

Version:

Water Icon 的支持自定义图标

2 lines (1 loc) 5.93 kB
var IconsBytedChess=function(C,u){"use strict";var m={size:"1em",spin:!1,strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{outStrokeColor:"#333",outFillColor:"transparent"},filled:{outStrokeColor:"#333",outFillColor:"#fff"},twoTone:{outStrokeColor:"#333",outFillColor:"#2f88ff"},multiColor:{outStrokeColor:"#333",outFillColor:"#2f88ff",innerStrokeColor:"#fff",innerFillColor:"#43ccf8"}},prefix:"cube"},j=function(i){var t=window.__iconCube__;return i&&t?t[i]:null},y=Object.prototype.hasOwnProperty,b=function(i,t){return y.call(i,t)},T=Object.prototype.toString,f=function(i){return T.call(i)},k=function(i,t,o,e,l){if(!i||!b(i,t))return l;var s=f(i[t])==="[object ".concat(o,"]")?i[t]:l;return t==="content"||t==="canSet"||e?s:l},W=function(i,t,o){var e=[];switch(i){case"outline":e.push(t[0]||o.outline.outStrokeColor),e.push(t[1]||o.outline.outFillColor),e.push(t[0]||o.outline.outStrokeColor),e.push(t[1]||o.outline.outFillColor);break;case"filled":e.push(t[0]||o.filled.outStrokeColor),e.push(t[0]||o.filled.outStrokeColor),e.push(t[1]||o.filled.outFillColor),e.push(t[1]||o.filled.outFillColor);break;case"twoTone":e.push(t[0]||o.twoTone.outStrokeColor),e.push(t[1]||o.twoTone.outFillColor),e.push(t[0]||o.twoTone.outStrokeColor),e.push(t[1]||o.twoTone.outFillColor);break;case"multiColor":e.push(t[0]||o.multiColor.outStrokeColor),e.push(t[1]||o.multiColor.outFillColor),e.push(t[2]||o.multiColor.innerStrokeColor),e.push(t[3]||o.multiColor.innerFillColor);break}return e},V=function(i,t,o){var e=t?.colors||[],l=[],s=j(i),n=k(s,"canSet","Boolean",!1,!0),h=k(s,"theme","String",n,t?.theme||o.theme);switch(h){case"outline":l.push(typeof e[0]=="string"&&!o.colors.outline.outStrokeColor?e[0]:o.colors.outline.outStrokeColor),l.push(typeof e[1]=="string"&&!o.colors.outline.outFillColor?e[1]:o.colors.outline.outFillColor),l.push(typeof e[0]=="string"&&!o.colors.outline.outStrokeColor?e[0]:o.colors.outline.outStrokeColor),l.push(typeof e[1]=="string"&&!o.colors.outline.outFillColor?e[1]:o.colors.outline.outFillColor);break;case"filled":l.push(typeof e[0]=="string"&&!o.colors.filled.outStrokeColor?e[0]:o.colors.filled.outStrokeColor),l.push(typeof e[0]=="string"&&!o.colors.filled.outStrokeColor?e[0]:o.colors.filled.outStrokeColor),l.push(typeof e[1]=="string"&&!o.colors.filled.outFillColor?e[1]:o.colors.filled.outFillColor),l.push(typeof e[1]=="string"&&!o.colors.filled.outFillColor?e[1]:o.colors.filled.outFillColor);break;case"twoTone":l.push(typeof e[0]=="string"&&!o.colors.twoTone.outStrokeColor?e[0]:o.colors.twoTone.outStrokeColor),l.push(typeof e[1]=="string"&&!o.colors.twoTone.outFillColor?e[1]:o.colors.twoTone.outFillColor),l.push(typeof e[0]=="string"&&!o.colors.twoTone.outStrokeColor?e[0]:o.colors.twoTone.outStrokeColor),l.push(typeof e[1]=="string"&&!o.colors.twoTone.outFillColor?e[1]:o.colors.twoTone.outFillColor);break;case"multiColor":l.push(typeof e[0]=="string"&&!o.colors.multiColor.outStrokeColor?e[0]:o.colors.multiColor.outStrokeColor),l.push(typeof e[1]=="string"&&!o.colors.multiColor.outFillColor?e[1]:o.colors.multiColor.outFillColor),l.push(typeof e[2]=="string"&&!o.colors.multiColor.innerStrokeColor?e[2]:o.colors.multiColor.innerStrokeColor),l.push(typeof e[3]=="string"&&!o.colors.multiColor.innerFillColor?e[3]:o.colors.multiColor.innerFillColor);break}var p=k(s,"size","String",n,String(t?.size||o.size)),S=k(s,"strokeLinejoin","String",n,t?.strokeLinejoin||o.strokeLinejoin),d=k(s,"strokeLinecap","String",n,t?.strokeLinecap||o.strokeLinecap),v=k(s,"strokeWidth","String",n,t?.strokeWidth||o.strokeWidth),L=k(s,"spin","String",n,t?.spin||o.spin),a=k(s,"colors","Array",n,t?.colors||l).slice();return a=W(h,a,o.colors),{size:p,strokeWidth:v,strokeLinecap:d,strokeLinejoin:S,colors:a,spin:L,id:i}},N=Symbol("cube-icon-context"),z=function(i,t,o){var e=u.defineComponent({name:"icon-"+i,props:["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","colors","spin","id"],setup:function(s){var n=u.inject(N,m)||m;return function(){var h=s.size,p=s.strokeWidth,S=s.strokeLinecap,d=s.strokeLinejoin,v=s.theme,L=s.colors,a=s.spin,w=String(s.id?s.id:i),F=V(w,{size:h,strokeWidth:p,strokeLinecap:S,strokeLinejoin:d,theme:v,colors:L,spin:a,id:w},n),c=["".concat(n.prefix,"-icon")];return c.push("".concat(n.prefix,"-icon-").concat(i)),t&&n.rtl&&c.push("".concat(n.prefix,"-icon-rtl")),a&&String(a)==="true"&&c.push("".concat(n.prefix,"-icon-spin")),i==="cube"?u.createVNode("span",{class:c.join(" "),innerHTML:o(F)},null):u.createVNode("span",{class:c.join(" ")},[o(F)])}}});return e},O=z("byted-chess",!1,function(r){return u.createVNode("svg",{width:r.size,height:r.size,viewBox:"0 0 48 48",fill:"none"},[u.createVNode("path",{d:"M34 4H14V14H34V4Z",stroke:r.colors[0],"stroke-width":r.strokeWidth,"stroke-miterlimit":"2","stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null),u.createVNode("path",{d:"M27 14L33 37H15L21 14",stroke:r.colors[0],"stroke-width":r.strokeWidth,"stroke-miterlimit":"2","stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null),u.createVNode("path",{d:"M40 44H8V40L14 37H34L40 40V44Z",stroke:r.colors[0],"stroke-width":r.strokeWidth,"stroke-miterlimit":"2","stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null),u.createVNode("path",{d:"M12 23.02H36",stroke:r.colors[0],"stroke-width":r.strokeWidth,"stroke-miterlimit":"2","stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null),u.createVNode("path",{d:"M20.5 4V8",stroke:r.colors[0],"stroke-width":r.strokeWidth,"stroke-miterlimit":"2","stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null),u.createVNode("path",{d:"M27.5 4V8",stroke:r.colors[0],"stroke-width":r.strokeWidth,"stroke-miterlimit":"2","stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null)])});return C.default=O,Object.defineProperty(C,"__esModule",{value:!0}),C}({},Vue);