-
Notifications
You must be signed in to change notification settings - Fork 6
/
vue-iconfont.min.js
6 lines (6 loc) · 3.12 KB
/
vue-iconfont.min.js
1
2
3
4
5
6
/*!
* vue-iconfont v2.5.1
* (c) 2018-present fjc0k <fjc0kb@gmail.com> (https://github.com/fjc0k)
* Released under the MIT License.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.VueIconfont=t()}(this,function(){"use strict";function e(){return(e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}var t=function(e,t,n){var o=Object.keys(t);for(var r in o){var i=o[r];null!=t[i]&&(n?n(i,e,t):e[i]=t[i])}return e};function n(){var e=[].slice.call(arguments),n=t({},e[0]),o=e.slice(1),r=function(e){var r=o[e];t(n,r,function(e){var o=n[e],i=r[e];if(o)switch(e){case"staticClass":n[e]=(o+" "+i).trim();break;case"attrs":case"domProps":case"scopedSlots":case"staticStyle":case"props":case"hook":case"transition":t(o,i);break;case"class":case"style":case"directives":n[e]=[].concat(i,o);break;case"on":case"nativeOn":t(o,i,function(e){o[e]?o[e]=[].concat(i[e],o[e]):o[e]=i[e]});break;default:n[e]=r[e]}else n[e]=i})};for(var i in o)r(i);return n}var o,r=function(e,t){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)};function i(e){o=o||document.head||document.getElementsByTagName("head")[0];var t=document.createElement("style");t.type="text/css",t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),r(o,t)}var a=!1,c=!1,s=Object.create(null),f=function(e,t){e._isMounted?t():e.$once("hook:mounted",t)},l=function(t){void 0===t&&(t={});var o=t,l=o.prefix,u=void 0===l?"":l,d=o.family,p=void 0===d?u:d,v=o.type,y=void 0===v?"svg":v,m=o.sprite,h=o.component,b=(h=void 0===h?{}:h).name,_=void 0===b?"Icon":b,g=h.props,O=void 0===g?{}:g,j=h.beforeRender;return e({},function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(h,["name","props","beforeRender"]),{name:_,functional:!0,props:e({},O,{name:String}),render:function(e,t){if("function"==typeof j){var o=j(e,t);"function"==typeof o&&(e=o)}var l=t.parent,d=t.data,v=t.props.name,h=t.children,b=v?(u?u+"-":"")+v:"";return"font"===y?(a||(a=!0,f(l,function(){i("."+"__font_icon__"+"{font-size:1em;}")})),e("i",n(d,{staticClass:"__font_icon__"+(p?" "+p:"")+(b?" "+b:"")}),h)):(c||(c=!0,f(l,function(){i("."+"__svg_icon__"+"{display:inline-block;width:1em;height:1em;fill:currentColor;vertical-align:-0.11em;font-size:1em;}")})),!m||m in s||(s[m]=!0,f(l,function(){var e,t;e=m,(t=document.createElement("div")).style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",t.style.display="none",t.innerHTML=e,r(document.body,t)})),e("svg",n(d,{staticClass:"__svg_icon__",attrs:{"aria-hidden":!0}}),[e("use",{attrs:{"xlink:href":"#"+b}})]))}})};return l.install=function(e,t){t&&"object"==typeof t||(t={}),Array.isArray(t)||(t=[t]),t.forEach(function(t){var n=l(t);e.component(t.tag||n.name,n)})},l});