|
- import{d as m,A as u,c as f,e as a,f as c,g as i,t as p,h as y,k as _,C as w}from"./index.121be81f.js";const k={key:0,class:"accessory text-primary flex items-center flex-wrap"},h=i("span",null,"\u4E0B\u8F7D",-1),v={key:1},x=m({name:"accessory"}),C=Object.assign(x,{props:{fileName:{type:String,default:""},fileId:{type:Number,default:void 0},isDownLoad:{type:Boolean,default:!0}},setup(t){const o=t,l=async()=>{const n=await w({fileId:o.fileId}),s=URL.createObjectURL(n),e=document.createElement("a");e.style.display="none",e.href=s,e.download=o.fileName,document.body.appendChild(e),e.click(),document.body.removeChild(e),window.URL.revokeObjectURL(s)},r=u(),d=()=>{const n=r.resolve({path:"/fileView",query:{id:o.fileId}});window.open(n.href,"_blank")};return(n,s)=>{const e=f("svg-icon");return t.fileName&&t.fileId?(a(),c("div",k,[i("span",{class:"cursor-pointer",onClick:d},p(t.fileName||"-"),1),t.isDownLoad?(a(),c("p",{key:0,class:"ml-16 flex items-center text-primary btn cursor-pointer",onClick:l},[y(e,{name:"down-icon",class:"mr-2 text-14"}),h])):_("",!0)])):(a(),c("span",v,"-"))}}});export{C as _};
|