index.0d7446cb.js 1.1 KB

123
  1. import{M as r,p as s,o as n,a as i,T as g,W as f,Q as a,b as S,P as z}from"./vue.aade88c7.js";const I=["src"],_=r({name:"svgIcon"}),x=r({..._,props:{name:{type:String},size:{type:Number,default:()=>14},color:{type:String}},setup(u){const e=u,m=["https","http","/src","/assets","data:image","./"],l=s(()=>e==null?void 0:e.name),p=s(()=>{var t;return(t=e==null?void 0:e.name)==null?void 0:t.startsWith("ele-")}),h=s(()=>m.find(t=>{var o;return(o=e.name)==null?void 0:o.startsWith(t)})),c=s(()=>`font-size: ${e.size}px;color: ${e.color};`),d=s(()=>`width: ${e.size}px;height: ${e.size}px;display: inline-block;overflow: hidden;`),v=s(()=>{const t=[];return["-webkit","-ms","-o","-moz"].forEach(y=>t.push(`${y}-filter: drop-shadow(${e.color} 30px 0);`)),`width: ${e.size}px;height: ${e.size}px;position: relative;left: -${e.size}px;${t.join("")}`});return(t,o)=>p.value?(n(),i("i",{key:0,class:"el-icon",style:a(c.value)},[(n(),g(f(l.value)))],4)):h.value?(n(),i("div",{key:1,style:a(d.value)},[S("img",{src:l.value,style:a(v.value)},null,12,I)],4)):(n(),i("i",{key:2,class:z(l.value),style:a(c.value)},null,6))}});export{x as default};
  2. //# sourceMappingURL=index.0d7446cb.js.map