uploadInstall-r0yNs0rd.js 1.6 KB

1
  1. import{a0 as m,_}from"./index-EwE51S_X.js";import{k as f}from"./store-F66kEjW2.js";import{a as h}from"./index-3qA-WN0K.js";import{d as w,r as v,K as n,e as i,f as c,i as t,t as a,j as p,L as k,F as g,m as $,y}from"./vue-A59npLRR.js";import"./echarts-cxb9vJr1.js";const I={class:"upload-install"},C={class:"tips"},S={class:"title"},B={class:"tip-item"},F={class:"tip-item"},T={class:"tip-item"},U={class:"el-upload__text"},b=w({__name:"uploadInstall",setup(D){const l=v({uploadState:"wait-file"}),u=e=>{if(!e||!e.raw)return;let s=new FormData;s.append("file",e.raw),m(s,{},!0).then(o=>{o.code==1&&f(o.data.file.url).then(d=>{l.uploadState="success",h(d.data.info.uid,0)}).catch(()=>{l.uploadState="wait-file"})})};return(e,s)=>{const o=n("Icon"),d=n("el-result"),r=n("el-upload");return i(),c("div",I,[t("div",C,[t("div",S,a(e.$t("module.Local upload warning")),1),t("div",B,"1. "+a(e.$t("module.The module can modify and add system files")),1),t("div",F,"2. "+a(e.$t("module.The module can execute sql commands and codes")),1),t("div",T,"3. "+a(e.$t("module.The module can install new front and rear dependencies")),1)]),p(r,{class:"upload-module","show-file-list":!1,accept:".zip",drag:"","auto-upload":!1,onChange:u},{default:k(()=>[l.uploadState=="wait-file"?(i(),c(g,{key:0},[p(o,{size:"50px",color:"#909399",name:"el-icon-UploadFilled"}),t("div",U,[$(a(e.$t("module.Drag the module package file here"))+" ",1),t("em",null,a(e.$t("module.Click me to upload")),1)])],64)):(i(),y(d,{key:1,icon:"success","sub-title":e.$t("module.Uploaded, installation is about to start, please wait")},null,8,["sub-title"]))]),_:1})])}}}),q=_(b,[["__scopeId","data-v-5ecde645"]]);export{q as default};