mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-13 12:02:51 +00:00
feat: 调整对话框尺寸计算,避免发送消息失败的情况
This commit is contained in:
parent
8b87a2bc40
commit
d60d3f374b
@ -1891,10 +1891,11 @@ export default {
|
|||||||
title: this.taskDetail.name,
|
title: this.taskDetail.name,
|
||||||
titleFixed: true,
|
titleFixed: true,
|
||||||
parent: null,
|
parent: null,
|
||||||
width: Math.min(window.screen.availWidth, this.$el.clientWidth + 72),
|
width: Math.min(window.screen.availWidth * 0.8, this.$el.clientWidth + 72),
|
||||||
height: Math.min(window.screen.availHeight, this.$el.clientHeight + 72),
|
height: Math.min(window.screen.availHeight * 0.8, this.$el.clientHeight + 72),
|
||||||
minWidth: 600,
|
minWidth: 600,
|
||||||
minHeight: 450,
|
minHeight: 450,
|
||||||
|
autoZoom: true,
|
||||||
};
|
};
|
||||||
if (this.hasOpenDialog) {
|
if (this.hasOpenDialog) {
|
||||||
config.minWidth = 800;
|
config.minWidth = 800;
|
||||||
@ -1911,9 +1912,11 @@ export default {
|
|||||||
|
|
||||||
resizeDialog() {
|
resizeDialog() {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
|
const width = Math.max(1100, this.windowWidth);
|
||||||
|
const height = Math.max(720, Math.min(width * 0.8, this.windowHeight));
|
||||||
this.$Electron.sendMessage('windowSize', {
|
this.$Electron.sendMessage('windowSize', {
|
||||||
width: Math.max(1100, this.windowWidth),
|
width,
|
||||||
height: Math.max(720, this.windowHeight),
|
height,
|
||||||
minWidth: 800,
|
minWidth: 800,
|
||||||
minHeight: 600,
|
minHeight: 600,
|
||||||
autoZoom: true,
|
autoZoom: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user