From ba400195cf383344b51017ca17cebccca7ff043e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=83=91=E8=8D=A3=E5=8D=87?= <3136352472@qq.com>
Date: Mon, 16 Dec 2019 14:21:03 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=B1=BB=E5=9E=8B(=E6=96=B0?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD),=E5=BD=B1=E5=93=8D=E7=9A=84=E8=8C=83?=
=?UTF-8?q?=E5=9B=B4(=E4=BB=A3=E7=A0=81=E9=80=BB=E8=BE=91),[=E6=B5=8B?=
=?UTF-8?q?=E8=AF=95]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
CHANGELOG.md | 1 +
index.js | 28 ++++++----------------------
2 files changed, 7 insertions(+), 22 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4c98429..fe86c36 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@
### 2019-12-16
#### 新功能
++ 3136352472 [14:21:02] :测试;影响的范围(代码逻辑)
+ 3136352472 [14:19:09] :测试;影响的范围(代码逻辑)
+ 3136352472 [14:14:30] :测试;影响的范围(代码逻辑)
+ 3136352472 [14:13:27] :测试;影响的范围(代码逻辑)
diff --git a/index.js b/index.js
index 14d3dcf..7048ca3 100644
--- a/index.js
+++ b/index.js
@@ -1,31 +1,15 @@
-const {app, BrowserWindow} = require('electron');
+const {app, BrowserWindow,screen } = require('electron');
function createWindow() {
+ let size = screen.getPrimaryDisplay().workAreaSize
+ let width = parseInt(size.width * 1)
+ let height = parseInt(size.height * 1)
- var s = "";
- s += " 网页可见区域宽:"+ document.body.clientWidth+"
";
- s += " 网页可见区域高:"+ document.body.clientHeight+"
";
- s += " 网页可见区域宽:"+ document.body.offsetWidth + " (包括边线和滚动条的宽)"+"
";
- s += " 网页可见区域高:"+ document.body.offsetHeight + " (包括边线的宽)"+"
";
- s += " 网页正文全文宽:"+ document.body.scrollWidth+"
";
- s += " 网页正文全文高:"+ document.body.scrollHeight+"
";
- s += " 网页被卷去的高(ff):"+ document.body.scrollTop+"
";
- s += " 网页被卷去的高(ie):"+ document.documentElement.scrollTop+"
";
- s += " 网页被卷去的左:"+ document.body.scrollLeft+"
";
- s += " 网页正文部分上:"+ window.screenTop+"
";
- s += " 网页正文部分左:"+ window.screenLeft+"
";
- s += " 屏幕分辨率的高:"+ window.screen.height+"
";
- s += " 屏幕分辨率的宽:"+ window.screen.width+"
";
- s += " 屏幕可用工作区高度:"+ window.screen.availHeight+"
";
- s += " 屏幕可用工作区宽度:"+ window.screen.availWidth+"
";
- s += " 你的屏幕设置是 "+ window.screen.colorDepth +" 位彩色"+"
";
- s += " 你的屏幕设置 "+ window.screen.deviceXDPI +" 像素/英寸"+"
";
- console.log(s);
// 创建浏览器窗口
let win = new BrowserWindow({
- width: window.screen.width,
- height: window.screen.height,
+ width: width,
+ height: height,
kiosk: false,
frame: false
});