修复bug-画笔 #174
|
@ -31,7 +31,8 @@ export const localStore = store.localStore
|
||||||
|
|
||||||
// 暴露Store存储对象
|
// 暴露Store存储对象
|
||||||
export const Store = store
|
export const Store = store
|
||||||
|
// 延时
|
||||||
|
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms))
|
||||||
/**
|
/**
|
||||||
* 获取静态资源,开发和生产环境
|
* 获取静态资源,开发和生产环境
|
||||||
* @param {*} url
|
* @param {*} url
|
||||||
|
@ -270,6 +271,15 @@ const eventHandles = (type, win) => {
|
||||||
winPdf=null
|
winPdf=null
|
||||||
win&&win.destroy()
|
win&&win.destroy()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 监听窗口的激活事件
|
||||||
|
win.on('focus', async () => {
|
||||||
|
toolState.isPdfWin=true
|
||||||
|
await sleep(20) // 延时
|
||||||
|
toolState.showBoardAll=false //恢复默认值
|
||||||
|
await sleep(50) // 延时
|
||||||
|
|
||||||
|
});
|
||||||
const on = {
|
const on = {
|
||||||
onClosed: () => {
|
onClosed: () => {
|
||||||
Remote.ipcMain.removeHandler('open-PDF:minimize')
|
Remote.ipcMain.removeHandler('open-PDF:minimize')
|
||||||
|
|
Loading…
Reference in New Issue