From 4f0997bfc12a160d993f23147f5bfe446dfa28bf Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Wed, 14 Aug 2024 14:06:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 10 +++++----- src/components/JoinSetting/index.tsx | 2 +- src/components/SharedFilesModel/index.tsx | 1 - src/components/UpdateModal/index.tsx | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/main.js b/main.js index ac6b73b..658b99a 100644 --- a/main.js +++ b/main.js @@ -255,11 +255,11 @@ app.on('ready', () => { } // 设置窗口尺寸 mainWindow.setSize(config.width, config.height) - // 设置窗口位置使其居中于当前屏幕 - const display = screen.getDisplayMatching({...mainWindow.getBounds()}); - const x = Math.round((display.workArea.width - mainWindow.getSize()[0]) / 2); - const y = Math.round((display.workArea.height - mainWindow.getSize()[1]) / 2); - mainWindow.setPosition(x, y); + // // 设置窗口位置使其居中于当前屏幕 + // const display = screen.getDisplayMatching({...mainWindow.getBounds()}); + // const x = Math.round((display.workArea.width - mainWindow.getSize()[0]) / 2); + // const y = Math.round((display.workArea.height - mainWindow.getSize()[1]) / 2); + // mainWindow.setPosition(x, y); }); }); diff --git a/src/components/JoinSetting/index.tsx b/src/components/JoinSetting/index.tsx index a0930c9..1610699 100644 --- a/src/components/JoinSetting/index.tsx +++ b/src/components/JoinSetting/index.tsx @@ -7,7 +7,7 @@ import { useState, useImperativeHandle, forwardRef } from "react"; import { PostRefresh } from '@/api/Login'; import Avatar from '@/components/Avatar'; import { useNavigate } from 'react-router-dom'; -const JoinSetting = forwardRef((props: any, ref: any) => { +const JoinSetting = forwardRef((_props: any, ref: any) => { useImperativeHandle(ref, () => ({ changeModal: (roomNum: string = '') => { let userInfo = JSON.parse(storage.getItem('user') as string) diff --git a/src/components/SharedFilesModel/index.tsx b/src/components/SharedFilesModel/index.tsx index d237db2..11b1049 100644 --- a/src/components/SharedFilesModel/index.tsx +++ b/src/components/SharedFilesModel/index.tsx @@ -72,7 +72,6 @@ const SharedFilesModel = forwardRef((props: any, ref: any) => { centered width={'800px'} onCancel={() => setIsSharedFilesModel(false)} - maskClosable >