| 12 |
- import{k as r,r as e,c as a,y as t,P as o,D as s,V as l,Q as i}from"./vendor-CgKklJ4r.js";import{_ as c}from"./_plugin-vue_export-helper-BCo6x5W8.js";const n=["innerHTML"],v=c(r({__name:"index",props:{size:{default:500},themeColor:{default:"var(--el-color-primary)"},src:{}},setup(r){const c=r,v=e(""),p=a((()=>{const r="number"==typeof c.size?`${c.size}px`:c.size;return{width:r,height:r}})),u={"#C7DEFF":"var(--el-color-primary-light-6)","#071F4D":"var(--el-color-primary-dark-2)","#00E4E5":"var(--el-color-primary-light-1)","#006EFF":"var(--el-color-primary)","#fff":"var(--art-main-bg-color)","#ffffff":"var(--art-main-bg-color)","#DEEBFC":"var(--el-color-primary-light-7)"},f=()=>{return r=this,e=null,a=function*(){if(c.src)try{const r=yield fetch(c.src);if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const e=yield r.text();v.value=(r=>Object.entries(u).reduce(((r,[e,a])=>{const t=new RegExp(`fill="${e}"`,"gi"),o=new RegExp(`stroke="${e}"`,"gi");return r.replace(t,`fill="${a}"`).replace(o,`stroke="${a}"`)}),r))(e)}catch(r){v.value=""}else v.value=""},new Promise(((t,o)=>{var s=r=>{try{i(a.next(r))}catch(e){o(e)}},l=r=>{try{i(a.throw(r))}catch(e){o(e)}},i=r=>r.done?t(r.value):Promise.resolve(r.value).then(s,l);i((a=a.apply(r,e)).next())}));var r,e,a};return t((()=>{f()})),(r,e)=>(s(),o("div",{class:"theme-svg",style:i(p.value)},[r.src?(s(),o("div",{key:0,class:"svg-container",innerHTML:v.value},null,8,n)):l("",!0)],4))}}),[["__scopeId","data-v-95c8ae66"]]);export{v as _};
|