Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

2 Zeilen
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.0018c8ef.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 _};