电子构建的应用程序,设置最小显示大小
安装后用户运行时,我需要在桌面应用程序上设置最小宽度和高度。 ,您会看到电子浏览器windows更改了
我已经添加了minwidth&对Broserwindow的明显,但行不通。
const win = new BrowserWindow({
width: 1600,
height: 700,
minWidth: 1024,
minHeight: 576,
frame: false,
webPreferences: {
// Use pluginOptions.nodeIntegration, leave this alone
// See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
// devTools: false,
nodeIntegration: false,
preload: path.join(__dirname, "preload.js"),
},
});
还增加了最小宽度&车身的最低点:
html body {
min-width: 1024px;
min-height: 576px;
padding: 0;
margin: 0;
font-family: "Noto Sans", sans-serif;
box-sizing: border-box;
background-color: rgb(31, 31, 31);
}
这是在上安装的应用程序
吗?
I need to set the minimum width and height on my desktop app when the user runs it after installation.
As you see the electron browserWindows changed
I already add minWidth & minHeight to BroserWindow, but doesn't work.
const win = new BrowserWindow({
width: 1600,
height: 700,
minWidth: 1024,
minHeight: 576,
frame: false,
webPreferences: {
// Use pluginOptions.nodeIntegration, leave this alone
// See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
// devTools: false,
nodeIntegration: false,
preload: path.join(__dirname, "preload.js"),
},
});
also added min-width & min-height in body:
html body {
min-width: 1024px;
min-height: 576px;
padding: 0;
margin: 0;
font-family: "Noto Sans", sans-serif;
box-sizing: border-box;
background-color: rgb(31, 31, 31);
}
any idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论