窗体宽高使用变量,设置最小高度

This commit is contained in:
sunyuqiang
2023-10-13 09:58:39 +08:00
parent 437419aca3
commit 3a2f44a448
4 changed files with 10 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
import { BrowserWindow, ipcMain, nativeTheme } from 'electron';
import localConfig from '../common/initLocalConfig';
import path from 'path';
import { WINDOW_MIN_HEIGHT } from '@/common/constans/common';
export default () => {
let win: any;
@@ -17,7 +18,7 @@ export default () => {
const createWindow = async (pluginInfo, viewInfo, view) => {
win = new BrowserWindow({
height: viewInfo.height,
minHeight: 60,
minHeight: WINDOW_MIN_HEIGHT,
width: viewInfo.width,
autoHideMenuBar: true,
titleBarStyle: 'hidden',