@fe6/icon-cube-vue
Version:
Water Icon 的支持自定义图标
2 lines (1 loc) • 6.54 kB
JavaScript
var IconsBytedFolderSettings=function(d,s){"use strict";var w={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},m=Object.prototype.hasOwnProperty,f=function(i,t){return m.call(i,t)},W=Object.prototype.toString,b=function(i){return W.call(i)},k=function(i,t,o,e,l){if(!i||!f(i,t))return l;var n=b(i[t])==="[object ".concat(o,"]")?i[t]:l;return t==="content"||t==="canSet"||e?n:l},T=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},N=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),L=k(n,"strokeLinecap","String",u,t?.strokeLinecap||o.strokeLinecap),v=k(n,"strokeWidth","String",u,t?.strokeWidth||o.strokeWidth),j=k(n,"spin","String",u,t?.spin||o.spin),a=k(n,"colors","Array",u,t?.colors||l).slice();return a=T(h,a,o.colors),{size:C,strokeWidth:v,strokeLinecap:L,strokeLinejoin:S,colors:a,spin:j,id:i}},V=Symbol("cube-icon-context"),z=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(V,w)||w;return function(){var h=n.size,C=n.strokeWidth,S=n.strokeLinecap,L=n.strokeLinejoin,v=n.theme,j=n.colors,a=n.spin,F=String(n.id?n.id:i),p=N(F,{size:h,strokeWidth:C,strokeLinecap:S,strokeLinejoin:L,theme:v,colors:j,spin:a,id:F},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(p)},null):s.createVNode("span",{class:c.join(" ")},[o(p)])}}});return e},M=z("byted-folder-settings",!1,function(r){return s.createVNode("svg",{width:r.size,height:r.size,viewBox:"0 0 48 48",fill:"none"},[s.createVNode("path",{d:"M5 8C5 6.89543 5.89543 6 7 6H19L24 12H41C42.1046 12 43 12.8954 43 14V40C43 41.1046 42.1046 42 41 42H7C5.89543 42 5 41.1046 5 40V8Z",fill:r.colors[1],stroke:r.colors[0],"stroke-width":r.strokeWidth,"stroke-linejoin":r.strokeLinejoin},null),s.createVNode("circle",{cx:"24",cy:"28",r:"4",fill:r.colors[3],stroke:r.colors[2],"stroke-width":r.strokeWidth},null),s.createVNode("path",{d:"M24 21V24",stroke:r.colors[2],"stroke-width":r.strokeWidth,"stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null),s.createVNode("path",{d:"M24 32V35",stroke:r.colors[2],"stroke-width":r.strokeWidth,"stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null),s.createVNode("path",{d:"M28.8281 23L26.7068 25.1213",stroke:r.colors[2],"stroke-width":r.strokeWidth,"stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null),s.createVNode("path",{d:"M20.8281 31L18.7068 33.1213",stroke:r.colors[2],"stroke-width":r.strokeWidth,"stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null),s.createVNode("path",{d:"M19 23L21.1213 25.1213",stroke:r.colors[2],"stroke-width":r.strokeWidth,"stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null),s.createVNode("path",{d:"M27 31L29.1213 33.1213",stroke:r.colors[2],"stroke-width":r.strokeWidth,"stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null),s.createVNode("path",{d:"M17 28H18.5H20",stroke:r.colors[2],"stroke-width":r.strokeWidth,"stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null),s.createVNode("path",{d:"M28 28H29.5H31",stroke:r.colors[2],"stroke-width":r.strokeWidth,"stroke-linecap":r.strokeLinecap,"stroke-linejoin":r.strokeLinejoin},null)])});return d.default=M,Object.defineProperty(d,"__esModule",{value:!0}),d}({},Vue);