mirror of
https://gitee.com/veigarchen/iconfont-download.git
synced 2025-10-14 05:40:31 +00:00
2 lines
6.2 KiB
JavaScript
2 lines
6.2 KiB
JavaScript
import{e as w,f as h,S as a,g as f,C as F,h as E,c as m,a as e,u as t,i as A,b as i,w as x,j as b,r as v,o as y,d as g}from"./index.7e07b943.js";const C=()=>{const o=w({isDebug:"false",isSupport:!1,config:{zipopen:!0,fixed:"1"},svg:{zipname:"",filenametype:!1},tscode:{zipname:"",tsname:"Ant",filenametype:!1},html:""}),s=async()=>{const n=(await a.getTab()).url;o.isSupport=/^https?:\/\/(www.)?iconfont.cn/.test(n)},c=()=>{let l={filenametype:o.svg.filenametype?"name":"code",zipname:f.isNull(o.svg.zipname)?void 0:o.svg.zipname};o.config.zipopen&&(l.fixed=parseInt(o.config.fixed+"")),a.send(F.allSVG,l)},p=()=>{if(f.isNull(o.tscode.tsname)){a.log("\u7EC4\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A");return}else if(!/^[A-z]+$/.test(o.tscode.tsname)){a.log("\u53EA\u80FD\u8F93\u5165\u82F1\u6587");return}let l={tsname:o.tscode.tsname,filenametype:o.tscode.filenametype?"name":"code",zipname:f.isNull(o.tscode.zipname)?void 0:o.tscode.zipname};o.config.zipopen&&(l.fixed=parseInt(o.config.fixed+"")),a.send(F.tscode,l)};return h(()=>{s()}),{conf:o,downloadSVG:c,exportTS:p}},D={style:{width:"400px","background-color":"#f2f2f2",overflow:"hidden auto",padding:"10px 15px",color:"#788fc3"}},z={class:"column fit",style:{gap:"10px"}},B=e("div",{class:"row flex-center",style:{"font-size":"20px","border-bottom":"1px solid #0000003b",height:"40px","font-family":"'\u5B8B\u4F53'"}}," Iconfont\u5DE5\u5177 ",-1),S={class:"col column relative",style:{gap:"5px"}},V={key:0,class:"absolute fit flex flex-center",style:{background:"#46463f8f","z-index":"9999","pointer-events":"all"}},U=e("div",{style:{color:"#ffffff","font-size":"20px"}},"\u8BF7\u8FDB\u5165iconfont\u7F51\u7AD9",-1),k=[U],L=e("div",{style:{"font-size":"14px"}}," \u6253\u5305\u914D\u7F6E ",-1),j={class:"column relative",style:{gap:"10px"}},N={class:"fit-width",style:{border:"1px solid #dcdfe6","border-radius":"4px"}},T={class:"column",style:{padding:"10px",margin:"0.5px",gap:"10px"}},G={class:"row items-center justify-between no-wrap",style:{gap:"10px"}},I={class:"col row items-center",style:{width:"120px"}},P=e("span",null,"\u538B\u7F29\u5F00\u542F\uFF1A",-1),M={class:"col row items-center"},H=e("span",null,"\u538B\u7F29\u6570\u7387\uFF1A",-1),O=e("div",{style:{"font-size":"14px"}}," \u4E0B\u8F7D\u672C\u9875\u6240\u6709SVG ",-1),Q={class:"column relative",style:{gap:"10px"}},R={class:"fit-width",style:{border:"1px solid #dcdfe6","border-radius":"4px"}},$={class:"column",style:{padding:"10px",margin:"0.5px",gap:"10px"}},q={class:"row items-center justify-between no-wrap",style:{gap:"10px"}},J={class:"col row items-center",style:{width:"120px"}},K=e("span",null,"\u538B\u7F29\u5305\u540D\uFF1A",-1),W={class:"col row items-center"},X=e("span",null,"\u6587\u4EF6\u540D\u79F0\uFF1A",-1),Y=e("div",{style:{"font-size":"14px"}}," \u5C06\u56FE\u6807\u5BFC\u51FA\u4E3Avue\u7EC4\u4EF6 ",-1),Z={class:"column relative",style:{gap:"10px"}},ee={class:"fit-width",style:{border:"1px solid #dcdfe6","border-radius":"4px"}},se={class:"column",style:{padding:"10px",margin:"0.5px",gap:"10px"}},te={class:"row items-center justify-between no-wrap",style:{gap:"10px"}},oe={class:"col row items-center",style:{width:"120px"}},ne=e("span",null,"\u538B\u7F29\u5305\u540D\uFF1A",-1),ue={class:"col row items-center"},ie=e("span",null,"\u6587\u4EF6\u540D\u79F0\uFF1A",-1),le={class:"row items-center justify-between"},ae=e("span",null,"\u7EC4\u4EF6\u540D\u79F0\uFF1A",-1),de=b('<div style="font-size:14px;"> \u5173\u4E8E\u4F5C\u8005 </div><div class="column relative" style="gap:10px;font-size:12px;"><div class="fit-width" style="border:1px solid #dcdfe6;border-radius:4px;"><div class="column" style="padding:10px;margin:0.5px;gap:2px;"><div class="row items-center justify-between no-wrap"><div class="col row items-center"><span>\u4F5C\u8005QQ/\u5FAE\u4FE1\uFF1A</span><span>1518079148</span></div><div class="col row items-center"><span>\u524D\u7AEF\u767D\u5AD6\u7FA4\uFF1A</span><span>553655769</span></div></div><div class="row items-center justify-between no-wrap"><div class="row items-center"><span>\u5408\u4F5C\uFF1A</span><span>\u6D4F\u89C8\u5668\u63D2\u4EF6\u3001web\u524D\u7AEF\u3001java\u540E\u7AEF\u3001\u5C0F\u7A0B\u5E8F\u3001\u811A\u672C\u3001opencv\u7B49</span></div></div></div></div></div>',2),ce=["innerHTML"],re=E({__name:"index",setup(o){const{conf:s,downloadSVG:c,exportTS:p}=C();return(l,n)=>{const r=v("c-switch"),d=v("c-input"),_=v("c-button");return y(),m("div",D,[e("div",z,[B,e("div",S,[!t(s).isSupport&&t(s).isDebug==="false"?(y(),m("div",V,k)):A("",!0),L,e("div",j,[e("div",N,[e("div",T,[e("div",G,[e("div",I,[P,i(r,{class:"col",onLabel:"\u5F00",offLabel:"\u5173",value:t(s).config.zipopen,"onUpdate:value":n[0]||(n[0]=u=>t(s).config.zipopen=u)},null,8,["value"])]),e("div",M,[H,i(d,{class:"col",style:{color:"#000000"},placeholder:"1-6\uFF0C1\u4F53\u79EF\u6700\u5C0F\uFF0C6\u4F53\u79EF\u6700\u5927",value:t(s).config.fixed,"onUpdate:value":n[1]||(n[1]=u=>t(s).config.fixed=u)},null,8,["value"])])])])])]),O,e("div",Q,[e("div",R,[e("div",$,[e("div",q,[e("div",J,[K,i(d,{class:"col",style:{color:"#000000"},placeholder:"\u9ED8\u8BA4\u4E3Aiconfont",value:t(s).svg.zipname,"onUpdate:value":n[2]||(n[2]=u=>t(s).svg.zipname=u)},null,8,["value"])]),e("div",W,[X,i(r,{class:"col",onLabel:"name",offLabel:"code",value:t(s).svg.filenametype,"onUpdate:value":n[3]||(n[3]=u=>t(s).svg.filenametype=u)},null,8,["value"])])]),i(_,{onClick:t(c)},{default:x(()=>[g("\u4E0B\u8F7DSVG")]),_:1},8,["onClick"])])])]),Y,e("div",Z,[e("div",ee,[e("div",se,[e("div",te,[e("div",oe,[ne,i(d,{class:"col",style:{color:"#000000"},placeholder:"\u9ED8\u8BA4\u4E3Aiconfont",value:t(s).tscode.zipname,"onUpdate:value":n[4]||(n[4]=u=>t(s).tscode.zipname=u)},null,8,["value"])]),e("div",ue,[ie,i(r,{class:"col",onLabel:"name",offLabel:"code",value:t(s).tscode.filenametype,"onUpdate:value":n[5]||(n[5]=u=>t(s).tscode.filenametype=u)},null,8,["value"])])]),e("div",le,[ae,i(d,{class:"col",style:{color:"#000000"},placeholder:"\u5FC5\u586B-\u4F7F\u7528\u9A7C\u5CF0\u5F0F\u82F1\u6587",value:t(s).tscode.tsname,"onUpdate:value":n[6]||(n[6]=u=>t(s).tscode.tsname=u)},null,8,["value"])]),i(_,{type:"warning",onClick:t(p)},{default:x(()=>[g("\u5BFC\u51FA\u4E3A\u7EC4\u4EF6")]),_:1},8,["onClick"])])])]),de,e("div",{innerHTML:t(s).html},null,8,ce)])])])}}});export{re as default};
|