@fe6/icon-img
Version:
Water Icon 的纯 HTML 图标
14 lines (13 loc) • 5.36 kB
JavaScript
var IconsBytedViewList=function(u){"use strict";var h={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"},C=function(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)},f=function(l,e,t){var o=e?.colors||[],r=[],i=e?.theme||t.theme;switch(i){case"outline":r.push(typeof o[0]=="string"?o[0]:t.colors.outline.outStrokeColor),r.push(typeof o[1]=="string"?o[1]:t.colors.outline.outFillColor),r.push(typeof o[0]=="string"?o[0]:t.colors.outline.outStrokeColor),r.push(typeof o[1]=="string"?o[1]:t.colors.outline.outFillColor);break;case"filled":r.push(typeof o[0]=="string"?o[0]:t.colors.filled.outStrokeColor),r.push(typeof o[0]=="string"?o[0]:t.colors.filled.outStrokeColor),r.push(typeof o[1]=="string"?o[1]:t.colors.filled.outFillColor),r.push(typeof o[1]=="string"?o[1]:t.colors.filled.outFillColor);break;case"twoTone":r.push(typeof o[0]=="string"?o[0]:t.colors.twoTone.outStrokeColor),r.push(typeof o[1]=="string"?o[1]:t.colors.twoTone.outFillColor),r.push(typeof o[0]=="string"?o[0]:t.colors.twoTone.outStrokeColor),r.push(typeof o[1]=="string"?o[1]:t.colors.twoTone.outFillColor);break;case"multiColor":r.push(typeof o[0]=="string"?o[0]:t.colors.multiColor.outStrokeColor),r.push(typeof o[1]=="string"?o[1]:t.colors.multiColor.outFillColor),r.push(typeof o[2]=="string"?o[2]:t.colors.multiColor.innerStrokeColor),r.push(typeof o[3]=="string"?o[3]:t.colors.multiColor.innerFillColor);break}return{size:e?.size||t.size,strokeWidth:e?.strokeWidth||t.strokeWidth,strokeLinecap:e?.strokeLinecap||t.strokeLinecap,strokeLinejoin:e?.strokeLinejoin||t.strokeLinejoin,colors:r,svg:e?.svg||"",id:l}},k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",p=function(l,e){for(var t="",o=0,r=l.length,i,s,c,n=e?g:k;o<r;){if(i=l.charCodeAt(o++)&255,o===r){t+=n.charAt(i>>2),t+=n.charAt((i&3)<<4),t+="==";break}if(s=l.charCodeAt(o++),o===r){t+=n.charAt(i>>2),t+=n.charAt((i&3)<<4|(s&240)>>4),t+=n.charAt((s&15)<<2),t+="=";break}c=l.charCodeAt(o++),t+=n.charAt(i>>2),t+=n.charAt((i&3)<<4|(s&240)>>4),t+=n.charAt((s&15)<<2|(c&192)>>6),t+=n.charAt(c&63)}return t},m=function(l){var e="",t,o,r=l.length;for(t=0;t<r;t++)o=l.charCodeAt(t),o>=1&&o<=127?e+=l.charAt(t):o>2047?(e+=String.fromCharCode(224|o>>12&15),e+=String.fromCharCode(128|o>>6&63),e+=String.fromCharCode(128|o>>0&63)):(e+=String.fromCharCode(192|o>>6&31),e+=String.fromCharCode(128|o>>0&63));return e},w=h,y=function(){return w},S=function(l,e,t){return function(o){var r=y(),i=["".concat(r.prefix,"-icon")];i.push("".concat(r.prefix,"-icon-").concat(l)),e&&r.rtl&&i.push("".concat(r.prefix,"-icon-rtl")),o!=null&&o.spin&&i.push("".concat(r.prefix,"-icon-spin"));var s=f(C(),o,r),c=t(s),n=p(m(c)),v="data:image/svg+xml;base64,".concat(n);return o!=null&&o.base64?v:'<span class="'.concat(i.join(" "),`">
<img class="`).concat(r.prefix,'-icon-img" src="').concat(v,`" />
</span>`)}},d=function(l){var e,t,o,r,i,s,c,n;return`<?xml version="1.0" encoding="UTF-8"?>
<svg width="`.concat(l.size,'" height="').concat(l.size,`" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="48" height="48" fill="white" fill-opacity="0.01"/>
<rect x="8" y="4" width="32" height="40" rx="2" fill="`).concat((e=l.colors)===null||e===void 0?void 0:e[1],'" stroke="').concat((t=l.colors)===null||t===void 0?void 0:t[0],'" stroke-width="').concat(l.strokeWidth,'" stroke-linejoin="').concat(l.strokeLinejoin,`"/>
<path d="M21 14H33" stroke="`).concat((o=l.colors)===null||o===void 0?void 0:o[2],'" stroke-width="').concat(l.strokeWidth,'" stroke-linecap="').concat(l.strokeLinecap,'" stroke-linejoin="').concat(l.strokeLinejoin,`"/>
<path d="M21 24H33" stroke="`).concat((r=l.colors)===null||r===void 0?void 0:r[2],'" stroke-width="').concat(l.strokeWidth,'" stroke-linecap="').concat(l.strokeLinecap,'" stroke-linejoin="').concat(l.strokeLinejoin,`"/>
<path d="M21 34H33" stroke="`).concat((i=l.colors)===null||i===void 0?void 0:i[2],'" stroke-width="').concat(l.strokeWidth,'" stroke-linecap="').concat(l.strokeLinecap,'" stroke-linejoin="').concat(l.strokeLinejoin,`"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 16C16.1046 16 17 15.1046 17 14C17 12.8954 16.1046 12 15 12C13.8954 12 13 12.8954 13 14C13 15.1046 13.8954 16 15 16Z" fill="`).concat((s=l.colors)===null||s===void 0?void 0:s[2],`"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 26C16.1046 26 17 25.1046 17 24C17 22.8954 16.1046 22 15 22C13.8954 22 13 22.8954 13 24C13 25.1046 13.8954 26 15 26Z" fill="`).concat((c=l.colors)===null||c===void 0?void 0:c[2],`"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 36C16.1046 36 17 35.1046 17 34C17 32.8954 16.1046 32 15 32C13.8954 32 13 32.8954 13 34C13 35.1046 13.8954 36 15 36Z" fill="`).concat((n=l.colors)===null||n===void 0?void 0:n[2],`"/>
</svg>`)},L=S("byted-view-list",!1,d);return u.default=L,u.getIconBytedViewListSvgHtml=d,Object.defineProperty(u,"__esModule",{value:!0}),u}({});