diff --git a/src/main/index.js b/src/main/index.js
index cd543a7..2178fb3 100644
--- a/src/main/index.js
+++ b/src/main/index.js
@@ -23,12 +23,15 @@ function createLoginWindow() {
show: false,
frame: false,
autoHideMenuBar: true,
+ maximizable: false,
+ resizable: false,
icon: join(__dirname, '../../resources/logo2.ico'),
...(process.platform === 'linux' ? { icon } : {}),
webPreferences: {
preload: join(__dirname, '../preload/index.js'),
sandbox: false,
- nodeIntegration: true
+ nodeIntegration: true,
+ contextIsolation: false, // 沙箱取消
}
})
loginWindow.type = 'login' // 唯一标识
@@ -46,10 +49,12 @@ function createLoginWindow() {
loginWindow.once('ready-to-show', () => {
loginWindow.show()
})
-
+
loginWindow.on('closed', () => {
loginWindow = null
})
+
+ remote.enable(loginWindow.webContents)
}
//主窗口
function createMainWindow() {
diff --git a/src/renderer/src/views/login/index.vue b/src/renderer/src/views/login/index.vue
index c8be982..3077b89 100644
--- a/src/renderer/src/views/login/index.vue
+++ b/src/renderer/src/views/login/index.vue
@@ -7,31 +7,24 @@
-
+
账号登录
-
+
记住密码
- 登录
+ 登录
-
+
@@ -122,9 +145,11 @@ onMounted(()=>{
align-items: center;
justify-content: center;
-webkit-app-region: drag;
+
.box-item {
width: 444px;
height: 520px;
+
&.desc {
background: #ffffff;
border-radius: 12px 0px 0px 12px;
@@ -136,14 +161,17 @@ onMounted(()=>{
justify-content: flex-start;
background-color: #003b94;
}
+
&.login {
background: #ffffff;
border-radius: 0px 12px 12px 0px;
padding: 34px 42px;
position: relative;
}
+
.welcome {
padding-top: 35px;
+
p {
color: #ffffff;
line-height: 25px;
@@ -153,11 +181,13 @@ onMounted(()=>{
font-size: 26px;
}
}
+
.welcome-img {
margin-top: 20px;
width: 350px;
height: 350px;
}
+
.login-title {
font-size: 20px;
text-align: center;
@@ -165,8 +195,10 @@ onMounted(()=>{
margin-bottom: 35px;
margin-top: 50px;
}
+
.login-form {
-webkit-app-region: no-drag;
+
.captcha-input {
width: 60%;
}
@@ -189,18 +221,20 @@ onMounted(()=>{
}
}
}
+
.header-tool {
position: absolute;
right: 0;
top: 0;
-webkit-app-region: no-drag;
+
span {
padding: 5px 10px;
cursor: pointer;
}
}
+
.el-form-item {
margin-bottom: 40px;
}
-