@fe6/icon-cube-vue
Version:
Water Icon 的支持自定义图标
2 lines (1 loc) • 8.45 kB
JavaScript
var IconsBytedCpu=function(h,r){"use strict";var j={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"},N=function(n){var t=window.__iconCube__;return n&&t?t[n]:null},F=Object.prototype.hasOwnProperty,y=function(n,t){return F.call(n,t)},M=Object.prototype.toString,W=function(n){return M.call(n)},a=function(n,t,o,l,i){if(!n||!y(n,t))return i;var s=W(n[t])==="[object ".concat(o,"]")?n[t]:i;return t==="content"||t==="canSet"||l?s:i},m=function(n,t,o){var l=[];switch(n){case"outline":l.push(t[0]||o.outline.outStrokeColor),l.push(t[1]||o.outline.outFillColor),l.push(t[0]||o.outline.outStrokeColor),l.push(t[1]||o.outline.outFillColor);break;case"filled":l.push(t[0]||o.filled.outStrokeColor),l.push(t[0]||o.filled.outStrokeColor),l.push(t[1]||o.filled.outFillColor),l.push(t[1]||o.filled.outFillColor);break;case"twoTone":l.push(t[0]||o.twoTone.outStrokeColor),l.push(t[1]||o.twoTone.outFillColor),l.push(t[0]||o.twoTone.outStrokeColor),l.push(t[1]||o.twoTone.outFillColor);break;case"multiColor":l.push(t[0]||o.multiColor.outStrokeColor),l.push(t[1]||o.multiColor.outFillColor),l.push(t[2]||o.multiColor.innerStrokeColor),l.push(t[3]||o.multiColor.innerFillColor);break}return l},H=function(n,t,o){var l=t?.colors||[],i=[],s=N(n),u=a(s,"canSet","Boolean",!1,!0),d=a(s,"theme","String",u,t?.theme||o.theme);switch(d){case"outline":i.push(typeof l[0]=="string"&&!o.colors.outline.outStrokeColor?l[0]:o.colors.outline.outStrokeColor),i.push(typeof l[1]=="string"&&!o.colors.outline.outFillColor?l[1]:o.colors.outline.outFillColor),i.push(typeof l[0]=="string"&&!o.colors.outline.outStrokeColor?l[0]:o.colors.outline.outStrokeColor),i.push(typeof l[1]=="string"&&!o.colors.outline.outFillColor?l[1]:o.colors.outline.outFillColor);break;case"filled":i.push(typeof l[0]=="string"&&!o.colors.filled.outStrokeColor?l[0]:o.colors.filled.outStrokeColor),i.push(typeof l[0]=="string"&&!o.colors.filled.outStrokeColor?l[0]:o.colors.filled.outStrokeColor),i.push(typeof l[1]=="string"&&!o.colors.filled.outFillColor?l[1]:o.colors.filled.outFillColor),i.push(typeof l[1]=="string"&&!o.colors.filled.outFillColor?l[1]:o.colors.filled.outFillColor);break;case"twoTone":i.push(typeof l[0]=="string"&&!o.colors.twoTone.outStrokeColor?l[0]:o.colors.twoTone.outStrokeColor),i.push(typeof l[1]=="string"&&!o.colors.twoTone.outFillColor?l[1]:o.colors.twoTone.outFillColor),i.push(typeof l[0]=="string"&&!o.colors.twoTone.outStrokeColor?l[0]:o.colors.twoTone.outStrokeColor),i.push(typeof l[1]=="string"&&!o.colors.twoTone.outFillColor?l[1]:o.colors.twoTone.outFillColor);break;case"multiColor":i.push(typeof l[0]=="string"&&!o.colors.multiColor.outStrokeColor?l[0]:o.colors.multiColor.outStrokeColor),i.push(typeof l[1]=="string"&&!o.colors.multiColor.outFillColor?l[1]:o.colors.multiColor.outFillColor),i.push(typeof l[2]=="string"&&!o.colors.multiColor.innerStrokeColor?l[2]:o.colors.multiColor.innerStrokeColor),i.push(typeof l[3]=="string"&&!o.colors.multiColor.innerFillColor?l[3]:o.colors.multiColor.innerFillColor);break}var C=a(s,"size","String",u,String(t?.size||o.size)),S=a(s,"strokeLinejoin","String",u,t?.strokeLinejoin||o.strokeLinejoin),v=a(s,"strokeLinecap","String",u,t?.strokeLinecap||o.strokeLinecap),V=a(s,"strokeWidth","String",u,t?.strokeWidth||o.strokeWidth),L=a(s,"spin","String",u,t?.spin||o.spin),k=a(s,"colors","Array",u,t?.colors||i).slice();return k=m(d,k,o.colors),{size:C,strokeWidth:V,strokeLinecap:v,strokeLinejoin:S,colors:k,spin:L,id:n}},b=Symbol("cube-icon-context"),T=function(n,t,o){var l=r.defineComponent({name:"icon-"+n,props:["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","colors","spin","id"],setup:function(s){var u=r.inject(b,j)||j;return function(){var d=s.size,C=s.strokeWidth,S=s.strokeLinecap,v=s.strokeLinejoin,V=s.theme,L=s.colors,k=s.spin,f=String(s.id?s.id:n),w=H(f,{size:d,strokeWidth:C,strokeLinecap:S,strokeLinejoin:v,theme:V,colors:L,spin:k,id:f},u),c=["".concat(u.prefix,"-icon")];return c.push("".concat(u.prefix,"-icon-").concat(n)),t&&u.rtl&&c.push("".concat(u.prefix,"-icon-rtl")),k&&String(k)==="true"&&c.push("".concat(u.prefix,"-icon-spin")),n==="cube"?r.createVNode("span",{class:c.join(" "),innerHTML:o(w)},null):r.createVNode("span",{class:c.join(" ")},[o(w)])}}});return l},p=T("byted-cpu",!1,function(e){return r.createVNode("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[r.createVNode("path",{d:"M38 8H10C8.89543 8 8 8.89543 8 10V38C8 39.1046 8.89543 40 10 40H38C39.1046 40 40 39.1046 40 38V10C40 8.89543 39.1046 8 38 8Z",fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null),r.createVNode("path",{d:"M30 18H18V30H30V18Z",fill:e.colors[3],stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null),r.createVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.9092 2V8V2Z",fill:e.colors[1]},null),r.createVNode("path",{d:"M14.9092 2V8",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),r.createVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.9092 40V46V40Z",fill:e.colors[1]},null),r.createVNode("path",{d:"M14.9092 40V46",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),r.createVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24 2V8V2Z",fill:e.colors[1]},null),r.createVNode("path",{d:"M24 2V8",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),r.createVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24 40V46V40Z",fill:e.colors[1]},null),r.createVNode("path",{d:"M24 40V46",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),r.createVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M33.0908 2V8V2Z",fill:e.colors[1]},null),r.createVNode("path",{d:"M33.0908 2V8",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),r.createVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M33.0908 40V46V40Z",fill:e.colors[1]},null),r.createVNode("path",{d:"M33.0908 40V46",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),r.createVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 14.9091H8H2Z",fill:e.colors[1]},null),r.createVNode("path",{d:"M2 14.9091H8",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),r.createVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M40 14.9091H46H40Z",fill:e.colors[1]},null),r.createVNode("path",{d:"M40 14.9091H46",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),r.createVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 24H8H2Z",fill:e.colors[1]},null),r.createVNode("path",{d:"M2 24H8",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),r.createVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M40 24H46H40Z",fill:e.colors[1]},null),r.createVNode("path",{d:"M40 24H46",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),r.createVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 33.0909H8H2Z",fill:e.colors[1]},null),r.createVNode("path",{d:"M2 33.0909H8",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),r.createVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M40 33.0909H46H40Z",fill:e.colors[1]},null),r.createVNode("path",{d:"M40 33.0909H46",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])});return h.default=p,Object.defineProperty(h,"__esModule",{value:!0}),h}({},Vue);