filesbox/web/dist/49991.5ec4d2a1.async.js
2024-07-26 14:10:54 +08:00

2 lines
1.5 KiB
JavaScript

(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[49991],{51616:function(d){d.exports={filesPreview:"filesPreview___1LF_B"}},49991:function(d,l,a){"use strict";a.r(l);var s=a(2824),o=a(67294),u=a(34895),v=a(51616),h=a.n(v),c=a(85893),I=e=>{var i=e.name,f=e.repeatName,M=e.sourceID,E=e.labelId,P=e.parentLevel,D=e.icon,O=e.hashMd5,w=e.fileType,_=e.keyword,x=e.open,L=e.issmall,y=e.setOpenModel,n=e.showIndex,T=(0,o.useState)(100),m=(0,s.Z)(T,2),k=m[0],S=m[1],C=(0,o.useState)(0),r=(0,s.Z)(C,2),B=r[0],R=r[1],b=()=>{var t;(t=document.querySelector("#deskIframe".concat(n)))===null||t===void 0||t.contentDocument.body.addEventListener("click",()=>{R(Date.now())})};return(0,o.useEffect)(()=>{var t;(t=document.querySelector("#deskIframe".concat(n)))===null||t===void 0||t.addEventListener("load",b)},[]),(0,c.jsx)(u.Z,{type:"filesPreview",title:i,open:x,issmall:L,showIndex:n,modelZindex:k,setOpenModel:y,setModelZindex:S,clickIframe:B,children:(0,c.jsx)("iframe",{id:"deskIframe".concat(n),className:"".concat(h().filesPreview," desktopOpenFilesbox"),src:"".concat(window.basePath?"/"+window.basePath:"/","#/filesBox?iframeId=","deskIframe".concat(n),"&isDestopView=1&pathName=").concat(i||"","&pathRepeatName=").concat(f||"","&pathSourceID=").concat(M,"&pathLabelId=").concat(E||"","&pathParentLevel=").concat(P||"","&pathIcon=").concat(D||"","&pathHashMd5=").concat(O||"","&pathFileType=").concat(w||"","&pathKeyword=").concat(_?encodeURIComponent(_):"")})})};l.default=I}}]);