import{d as e,a,b as n,h as s,k as l,e as t,w as r,t as o,j as i,l as c,x as d,E as p,_ as u}from"./index-d052b22f-1780912037814v=1.0.0.js";const m={key:0,class:"file_container"},f={class:"left flex"},w={class:"right"},_=e({name:"FileViewItem"}),y=u(e({..._,props:{name:String,url:String,type:String},setup(e){const u=e,_=async()=>{u.url?window.open("http://14.17.80.135:28012/onlinePreview?url="+encodeURIComponent(d.exports.Base64.encode(u.url))):p.warning("预览地址无效")};return(d,p)=>{const y=a("Document"),v=a("el-icon"),k=a("View"),x=a("el-link"),g=a("Download");return e.url?(n(),s("div",m,[l("div",f,[t(v,{class:"mr5"},{default:r((()=>[t(y)])),_:1}),l("span",null,o(e.type)+":",1),l("span",null,o(e.name),1)]),l("div",w,[t(x,{type:"primary",class:"mr10",onClick:_},{default:r((()=>[t(v,{class:"mr5"},{default:r((()=>[t(k)])),_:1}),p[1]||(p[1]=i("预览"))])),_:1}),t(x,{type:"primary",onClick:p[0]||(p[0]=e=>(()=>{const e=document.createElement("a");e.href=u.url,e.download=u.name?u.name:"exportdata",e.click()})())},{default:r((()=>[t(v,{class:"mr5"},{default:r((()=>[t(g)])),_:1}),p[2]||(p[2]=i("下载"))])),_:1})])])):c("v-if",!0)}}}),[["__scopeId","data-v-9955184d"]]);export{y as default};
