新增窗口大小设置

This commit is contained in:
lyswhut
2019-10-22 01:25:03 +08:00
parent c97bc5edfc
commit 31e8b466cf
13 changed files with 118 additions and 18 deletions
+9 -1
View File
@@ -164,7 +164,7 @@ export const isChildren = (parent, children) => {
* @param {*} setting
*/
export const updateSetting = setting => {
const defaultVersion = '1.0.12'
const defaultVersion = '1.0.13'
const defaultSetting = {
version: defaultVersion,
player: {
@@ -216,6 +216,7 @@ export const updateSetting = setting => {
password: '',
},
},
windowSizeId: 1,
themeId: 0,
sourceId: 'kw',
apiSource: 'test',
@@ -369,3 +370,10 @@ export const getCacheSize = () => remote.getCurrentWindow().webContents.session.
* @param {*} win
*/
export const clearCache = () => remote.getCurrentWindow().webContents.session.clearCache()
/**
* 设置窗口大小
* @param {*} width
* @param {*} height
*/
export const setWindowSize = (width, height) => remote.getCurrentWindow().setBounds({ width, height })