vue-ss
Version:
SVG sprites component for symbol id base on VueJS
1 lines • 1.34 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueIcon=e():t.VueIcon=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){t.exports=r(1)},function(t,e){"use strict";var r=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var u,c=t[Symbol.iterator]();!(n=(u=c.next()).done)&&(r.push(u.value),!e||r.length!==e);n=!0);}catch(f){i=!0,o=f}finally{try{!n&&c["return"]&&c["return"]()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.exports={template:'\n <svg :width="cSize.width" :height="cSize.height">\n <use xlink:href="#{{typ}}"></use>\n </svg>\n',props:{size:{type:[String,Number],"default":"20x20"},typ:{type:String,required:!0,"default":"add"}},computed:{cSize:function(){var t=this.size,e=void 0,n=void 0;if(t.includes&&t.includes("x")){var i=t.split("x"),o=r(i,2);e=o[0],n=o[1]}else e=n=t;return{width:e,height:n}}},data:function(){return{}}}}])});