Browse Source

修复一个bug,当初始加载为自由屏的时候,将分屏状态置为0

liuwei 4 years ago
parent
commit
29363b6174

+ 1 - 0
src/renderer/components/Admin.vue

@@ -66,6 +66,7 @@
 
             // 关闭窗口
             async closeWindow() {
+                // 退出登录
                 await reqLogout(this.user)
                 require('electron').ipcRenderer.send('window-close')
             }

+ 1 - 1
src/renderer/components/BigShow.vue

@@ -209,7 +209,7 @@
                             obj[item.ID].bindList.push(i + 1)
                         }
                         // 根据拼接屏数量得到分屏状态
-                        obj[item.ID].splitStatus = Math.floor(Math.sqrt(num) - 1)
+                        obj[item.ID].splitStatus = Math.floor(Math.sqrt(num) - 1) === -1 ? 0 : Math.floor(Math.sqrt(num) - 1)
                     })
                     this.$store.dispatch('updateBigscreenObj', {...obj,...bigscreenObj})
 

+ 1 - 0
src/renderer/components/Login.vue

@@ -149,6 +149,7 @@
 
             // 关闭窗口
             async closeWindow() {
+                // 需要先退出登录
                 await reqLogout(this.user)
                 require('electron').ipcRenderer.send('window-close')
             }