Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/426.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript setMinimumSize之后useContentSize设置为undefined_Javascript_Node.js_Electron_Window_Chromium - Fatal编程技术网

Javascript setMinimumSize之后useContentSize设置为undefined

Javascript setMinimumSize之后useContentSize设置为undefined,javascript,node.js,electron,window,chromium,Javascript,Node.js,Electron,Window,Chromium,出于某种原因,setMinimumSize将useContentSize设置为undefined。如果窗口小于最小尺寸,它也不会将窗口放大到最小尺寸 const { remote } = require('electron') remote.getCurrentWindow().setMinimumSize(X, Y) // Here is a rough solution to the second problem. let width, height width = innerWidth

出于某种原因,
setMinimumSize
useContentSize
设置为
undefined
。如果窗口小于最小尺寸,它也不会将窗口放大到最小尺寸

const { remote } = require('electron')
remote.getCurrentWindow().setMinimumSize(X, Y)

// Here is a rough solution to the second problem.
let width, height
width = innerWidth < X ? X : innerWidth
height = innerHeight < Y ? Y : innerHeight
remote.getCurrentWindow().setContentSize(width, height)
const{remote}=require('electron')
remote.getCurrentWindow().setMinimumSize(X,Y)
//这是第二个问题的大致解决方案。
让宽度、高度
宽度=内部宽度
有人知道如何解决
useContentSize
问题吗

是指向GitHub上的bug报告的链接