切换导航条
切换导航条
当前项目
正在载入...
登录
术习电报
/
electron-vue-template
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
作者
umbrella22
2020-12-30 19:52:31 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
提交
eefe20bb786475c6ccf58f21b60260c79ba4b474
eefe20bb
1 个父辈
de8a5391
emm一些。。奇怪的错误
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
6 行增加
和
7 行删除
src/main/config/StaticPath.ts
src/main/index.ts
src/main/services/ipcMain.ts
src/main/config/StaticPath.ts
查看文件 @
eefe20b
...
...
@@ -5,11 +5,10 @@ import { DllFolder } from '@config/index'
var
__static
:
string
var
__lib
:
string
if
(
process
.
env
.
NODE_ENV
!==
'development'
)
{
__static
=
join
(
__dirname
,
'/static'
).
replace
(
/
\\
/g
,
'\\\\'
)
;
__static
=
join
(
__dirname
,
'/static'
).
replace
(
/
\\
/g
,
'\\\\'
)
__lib
=
join
(
__dirname
,
'..'
,
'..'
,
'..'
,
'..'
,
`
${
DllFolder
}
`
).
replace
(
/
\\
/g
,
'\\\\'
)
}
export
const
winURL
=
process
.
env
.
NODE_ENV
===
'development'
?
`http://localhost:
${
process
.
env
.
PORT
}
`
:
`file://
${
__dirname
}
/index.html`
export
const
loadingURL
=
process
.
env
.
NODE_ENV
===
'development'
?
`http://localhost:
${
process
.
env
.
PORT
}
/static/loader.html`
:
`file://
${
__static
}
/loader.html`
export
const
lib
=
__lib
...
...
src/main/index.ts
查看文件 @
eefe20b
'use strict'
import
{
app
}
from
'electron'
import
i
nitWindow
from
'./services/windowManager'
import
I
nitWindow
from
'./services/windowManager'
import
DisableButton
from
'./config/DisableButton'
import
electronDevtoolsInstaller
,
{
VUEJS_DEVTOOLS
}
from
'electron-devtools-installer'
function
onAppReady
()
{
new
i
nitWindow
().
initWindow
()
function
onAppReady
()
{
new
I
nitWindow
().
initWindow
()
DisableButton
.
Disablef12
()
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
electronDevtoolsInstaller
(
VUEJS_DEVTOOLS
)
...
...
@@ -17,7 +17,7 @@ function onAppReady() {
app
.
isReady
()
?
onAppReady
()
:
app
.
on
(
'ready'
,
onAppReady
)
// 由于9.x版本问题,需要加入该配置关闭跨域问题
app
.
commandLine
.
appendSwitch
(
'disable-features'
,
'OutOfBlinkCors'
)
;
app
.
commandLine
.
appendSwitch
(
'disable-features'
,
'OutOfBlinkCors'
)
app
.
on
(
'window-all-closed'
,
()
=>
{
// 所有平台均为所有窗口关闭就退出软件
...
...
src/main/services/ipcMain.ts
查看文件 @
eefe20b
...
...
@@ -3,7 +3,7 @@ import Server from '../server'
import
{
winURL
}
from
'../config/StaticPath'
export
default
{
Mainfunc
(
mainWindow
:
BrowserWindow
,
IsUseSysTitle
:
Boolean
)
{
Mainfunc
(
mainWindow
:
BrowserWindow
,
IsUseSysTitle
:
Boolean
)
{
ipcMain
.
handle
(
'IsUseSysTitle'
,
async
()
=>
{
return
IsUseSysTitle
})
...
...
请
注册
或
登录
后发表评论