UNPKG

@yuanjili/js-es-c

Version:

js工具包

1 lines 728 B
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=openWindow;function openWindow(a,b,c,d){var e=void 0===window.screenLeft?screen.left:window.screenLeft,f=void 0===window.screenTop?screen.top:window.screenTop,g=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,h=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,i=window.open(a,b,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width="+c+", height="+d+", top="+(h/2-d/2+f)+", left="+(g/2-c/2+e));return window.focus&&i.focus(),i}