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

2 lines
1.2 KiB
JavaScript

(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[62731],{12670:function(i){i.exports={iframeBox:"iframeBox___2NRct"}},62731:function(i,a,e){"use strict";e.r(a),e.d(a,{default:function(){return u}});var M=e(67294),E=e(28216),o=e(30672),c=e(34895),f=e(12670),p=e.n(f),n=e(85893),l,m,u=(l=(0,E.$j)(h=>{var s=h.common;return{common:s}}),l(m=class extends M.PureComponent{constructor(){super(...arguments);this.state={modelZindex:100}}componentDidMount(){}render(){var s=this,x=(0,o.lw)((0,o.Kd)()),r=s.props,Z=r.dispatch,P=r.open,O=r.setOpenModel,d=r.previewParams,D=d.name,g=d.linkUrl,B=d.width,C=d.height,R=this.state.modelZindex,_=(t,v)=>{if(typeof t=="string"){var I=v=="width"?$(document).width():$(document).height();if(t.indexOf("%")>-1){var K=parseInt(t)/100;return I*K}else return parseFloat(t)||(v=="width"?980:600)}else return t},U=_(B,"width"),W=_(C,"height"),w=t=>{s.setState({modelZindex:t})};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(c.Z,{open:P,modelZindex:R,setOpenModel:O,setModelZindex:w,type:"preview",style:{width:U,height:W},title:D||x.formatMessage({id:"log.file.newWebsite"}),children:(0,n.jsx)("div",{className:p().iframeBox,children:(0,n.jsx)("iframe",{src:g})})})})}})||m)}}]);