|
|
|
@ -277,13 +277,13 @@ export const openWindow = (url, title, w, h) => {
|
|
|
|
|
const width = window.innerWidth |
|
|
|
|
? window.innerWidth |
|
|
|
|
: document.documentElement.clientWidth |
|
|
|
|
? document.documentElement.clientWidth |
|
|
|
|
: screen.width; |
|
|
|
|
? document.documentElement.clientWidth |
|
|
|
|
: screen.width; |
|
|
|
|
const height = window.innerHeight |
|
|
|
|
? window.innerHeight |
|
|
|
|
: document.documentElement.clientHeight |
|
|
|
|
? document.documentElement.clientHeight |
|
|
|
|
: screen.height; |
|
|
|
|
? document.documentElement.clientHeight |
|
|
|
|
: screen.height; |
|
|
|
|
|
|
|
|
|
const left = width / 2 - w / 2 + dualScreenLeft; |
|
|
|
|
const top = height / 2 - h / 2 + dualScreenTop; |
|
|
|
@ -291,13 +291,13 @@ export const openWindow = (url, title, w, h) => {
|
|
|
|
|
url, |
|
|
|
|
title, |
|
|
|
|
'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' + |
|
|
|
|
w + |
|
|
|
|
', height=' + |
|
|
|
|
h + |
|
|
|
|
', top=' + |
|
|
|
|
top + |
|
|
|
|
', left=' + |
|
|
|
|
left |
|
|
|
|
w + |
|
|
|
|
', height=' + |
|
|
|
|
h + |
|
|
|
|
', top=' + |
|
|
|
|
top + |
|
|
|
|
', left=' + |
|
|
|
|
left |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Puts focus on the newWindow
|
|
|
|
@ -314,6 +314,18 @@ export const getScreen = isCollapse => {
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export const getHtmls = (arrs, htmldemo) => { |
|
|
|
|
let html = '' |
|
|
|
|
arrs.map(item => { |
|
|
|
|
let strhtml = JSON.parse(JSON.stringify(htmldemo)); |
|
|
|
|
for (let key in item) { |
|
|
|
|
let str = '${' + key + '}'; |
|
|
|
|
strhtml = strhtml.replace(str, item[key]); |
|
|
|
|
} |
|
|
|
|
html += strhtml; |
|
|
|
|
}); |
|
|
|
|
return html |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 获取顶部地址栏地址 |
|
|
|
|
*/ |
|
|
|
|