UNPKG

@fe6/icon-cube-vue

Version:

Water Icon 的支持自定义图标

2 lines (1 loc) 6.28 kB
var IconsBytedGroup=function(d,s){"use strict";var p={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"},y=function(i){var t=window.__iconCube__;return i&&t?t[i]:null},f=Object.prototype.hasOwnProperty,m=function(i,t){return f.call(i,t)},V=Object.prototype.toString,b=function(i){return V.call(i)},k=function(i,t,o,e,l){if(!i||!m(i,t))return l;var n=b(i[t])==="[object ".concat(o,"]")?i[t]:l;return t==="content"||t==="canSet"||e?n: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},T=function(i,t,o){var e=t?.colors||[],l=[],n=y(i),u=k(n,"canSet","Boolean",!1,!0),h=k(n,"theme","String",u,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 C=k(n,"size","String",u,String(t?.size||o.size)),S=k(n,"strokeLinejoin","String",u,t?.strokeLinejoin||o.strokeLinejoin),v=k(n,"strokeLinecap","String",u,t?.strokeLinecap||o.strokeLinecap),j=k(n,"strokeWidth","String",u,t?.strokeWidth||o.strokeWidth),L=k(n,"spin","String",u,t?.spin||o.spin),a=k(n,"colors","Array",u,t?.colors||l).slice();return a=W(h,a,o.colors),{size:C,strokeWidth:j,strokeLinecap:v,strokeLinejoin:S,colors:a,spin:L,id:i}},N=Symbol("cube-icon-context"),H=function(i,t,o){var e=s.defineComponent({name:"icon-"+i,props:["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","colors","spin","id"],setup:function(n){var u=s.inject(N,p)||p;return function(){var h=n.size,C=n.strokeWidth,S=n.strokeLinecap,v=n.strokeLinejoin,j=n.theme,L=n.colors,a=n.spin,w=String(n.id?n.id:i),F=T(w,{size:h,strokeWidth:C,strokeLinecap:S,strokeLinejoin:v,theme:j,colors:L,spin:a,id:w},u),c=["".concat(u.prefix,"-icon")];return c.push("".concat(u.prefix,"-icon-").concat(i)),t&&u.rtl&&c.push("".concat(u.prefix,"-icon-rtl")),a&&String(a)==="true"&&c.push("".concat(u.prefix,"-icon-spin")),i==="cube"?s.createVNode("span",{class:c.join(" "),innerHTML:o(F)},null):s.createVNode("span",{class:c.join(" ")},[o(F)])}}});return e},z=H("byted-group",!1,function(r){return s.createVNode("svg",{width:r.size,height:r.size,viewBox:"0 0 48 48",fill:"none"},[s.createVNode("path",{d:"M12 4H4V12H12V4Z",fill:r.colors[1],stroke:r.colors[0],"stroke-width":r.strokeWidth,"stroke-linejoin":r.strokeLinejoin},null),s.createVNode("path",{d:"M44 36H36V44H44V36Z",fill:r.colors[1],stroke:r.colors[0],"stroke-width":r.strokeWidth,"stroke-linejoin":r.strokeLinejoin},null),s.createVNode("path",{d:"M12 36H4V44H12V36Z",fill:r.colors[1],stroke:r.colors[0],"stroke-width":r.strokeWidth,"stroke-linejoin":r.strokeLinejoin},null),s.createVNode("path",{d:"M44 4H36V12H44V4Z",fill:r.colors[1],stroke:r.colors[0],"stroke-width":r.strokeWidth,"stroke-linejoin":r.strokeLinejoin},null),s.createVNode("path",{d:"M8 36V12",stroke:r.colors[0],"stroke-width":r.strokeWidth,"stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null),s.createVNode("path",{d:"M40 36V12",stroke:r.colors[0],"stroke-width":r.strokeWidth,"stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null),s.createVNode("path",{d:"M12 8H36",stroke:r.colors[0],"stroke-width":r.strokeWidth,"stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null),s.createVNode("path",{d:"M12 40H36",stroke:r.colors[0],"stroke-width":r.strokeWidth,"stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null),s.createVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16 16H25.6V22.4H32V32H22.4V25.6H16V16Z",fill:r.colors[1],stroke:r.colors[0],"stroke-width":r.strokeWidth,"stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null)])});return d.default=z,Object.defineProperty(d,"__esModule",{value:!0}),d}({},Vue);