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