import{i as v,_ as y}from"./index-c87bcfde-1782468512657v=1.0.0.js";import{E as C}from"./eleVendor-12a75a9a-1782468512657v=1.0.0.js";import{x as d,al as s,y as V,z as g,A as r,B as k,Q as e,I as a,O as x,M as _,L as D}from"./vendor-27e23c1b-1782468512657v=1.0.0.js";const B={key:0,class:"file_container"},E={class:"left flex"},I={class:"right"},h=d({name:"FileViewItem"}),F=d({...h,props:{name:String,url:String},setup(l){const n=l,m=async()=>{n.url?window.open("http://10.222.10.6/fileview/onlinePreview?url="+encodeURIComponent(v.encode(n.url))):C.warning("\u9884\u89C8\u5730\u5740\u65E0\u6548")},u=()=>{const o=document.createElement("a");o.href=n.url,o.download=n.name?n.name:"exportdata",o.click()};return(o,t)=>{const p=s("Document"),i=s("el-icon"),f=s("View"),c=s("el-link"),w=s("Download");return l.url?(V(),g("div",B,[r("div",E,[k(o.$slots,"title",{},void 0,!0),e(i,{class:"mr5"},{default:a(()=>[e(p)]),_:1}),r("span",null,x(l.name),1)]),r("div",I,[e(c,{type:"primary",class:"mr10",onClick:m},{default:a(()=>[e(i,{class:"mr5"},{default:a(()=>[e(f)]),_:1}),t[1]||(t[1]=_("\u9884\u89C8",-1))]),_:1,__:[1]}),e(c,{type:"primary",onClick:t[0]||(t[0]=N=>u())},{default:a(()=>[e(i,{class:"mr5"},{default:a(()=>[e(w)]),_:1}),t[2]||(t[2]=_("\u4E0B\u8F7D",-1))]),_:1,__:[2]})])])):D("v-if",!0)}}});const M=y(F,[["__scopeId","data-v-655ada21"]]);export{M as default};
