Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

2 řádky
1.1KB

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