您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

index-33a0e6e3.js 1.1KB

1
  1. import{y as m,b as u,c as a,d as c,e as i,t as f,f as p,j as y,k as w,U as _}from"./index-dd5fae99.js";const k={key:0,class:"accessory text-primary flex items-center flex-wrap"},v={key:1},x=w({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=m(),d=()=>{const o=r.resolve({path:"/fileView",query:{id:s.fileId}});window.open(o.href,"_blank")};return(o,n)=>{const e=u("svg-icon");return t.fileName&&t.fileId?(a(),c("div",k,[i("span",{class:"cursor-pointer",onClick:d},f(t.fileName||"-"),1),t.isDownLoad?(a(),c("p",{key:0,class:"ml-16 flex items-center text-primary btn cursor-pointer",onClick:l},[p(e,{name:"down-icon",class:"mr-2 text-14"}),n[0]||(n[0]=i("span",null,"下载",-1))])):y("",!0)])):(a(),c("span",v,"-"))}}});export{N as _};