Files
dafuweng-buildadmin/dafuweng-webman/public/assets/uploadInstall-BMEDjis1.js
2026-03-18 11:22:12 +08:00

2 lines
1.7 KiB
JavaScript

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