Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
StandaloneFrame
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
StandaloneFrame
Commits
e6e1408e
Commit
e6e1408e
authored
Jun 19, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asd
parent
a7dd58a6
Changes
27
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
394 additions
and
331 deletions
+394
-331
.DS_Store
.DS_Store
+0
-0
.gitignore
.gitignore
+4
-3
.sequelizerc
.sequelizerc
+3
-3
system.json
data/system.json
+6
-4
builder.json
electron/config/builder.json
+2
-2
config.default.js
electron/config/config.default.js
+57
-58
encrypt.js
electron/config/encrypt.js
+9
-13
example.js
electron/controller/example.js
+20
-13
config.json
electron/database/config.json
+14
-0
20230616091828-create-user.js
electron/database/migrations/20230616091828-create-user.js
+31
-0
index.js
electron/model/index.js
+25
-19
env.js
frontend/config/env.js
+2
-2
defineApp.ts
frontend/src/.umi-production/core/defineApp.ts
+2
-2
helmet.ts
frontend/src/.umi-production/core/helmet.ts
+1
-1
history.ts
frontend/src/.umi-production/core/history.ts
+1
-1
historyIntelli.ts
frontend/src/.umi-production/core/historyIntelli.ts
+1
-1
plugin.ts
frontend/src/.umi-production/core/plugin.ts
+6
-6
polyfill.ts
frontend/src/.umi-production/core/polyfill.ts
+187
-187
route.tsx
frontend/src/.umi-production/core/route.tsx
+1
-1
exports.ts
frontend/src/.umi-production/exports.ts
+5
-5
index.tsx
frontend/src/.umi-production/plugin-model/index.tsx
+1
-1
model.ts
frontend/src/.umi-production/plugin-model/model.ts
+1
-1
testBrowser.tsx
frontend/src/.umi-production/testBrowser.tsx
+2
-2
tsconfig.json
frontend/src/.umi-production/tsconfig.json
+1
-1
umi.ts
frontend/src/.umi-production/umi.ts
+2
-2
login.jsx
frontend/src/pages/user/login.jsx
+9
-2
package.json
package.json
+1
-1
No files found.
.DS_Store
View file @
e6e1408e
No preview for this file type
.gitignore
View file @
e6e1408e
...
...
@@ -2,9 +2,9 @@ node_modules
/.env.local
/.umirc.local.ts
/config/config.local.ts
/src/.umi
/src/.umi-production
/src/.umi-test
/
frontend/
src/.umi
/
frontend/
src/.umi-production
*
/src/.umi-test
dist
.swc
.history
...
...
@@ -18,3 +18,4 @@ data/
.vscode/launch.json
public/electron/
pnpm-lock.yaml
.sequelizerc
View file @
e6e1408e
...
...
@@ -3,8 +3,8 @@
const path = require("path");
module.exports = {
"config": path.join(__dirname, "
data
/config.json"),
"migrations-path": path.join(__dirname, "
data
/migrations"),
"seeders-path": path.join(__dirname, "
data
/seeders"),
"config": path.join(__dirname, "
electron/database
/config.json"),
"migrations-path": path.join(__dirname, "
electron/database
/migrations"),
"seeders-path": path.join(__dirname, "
electron/database
/seeders"),
"models-path": path.join(__dirname, "electron/model"),
};
data/system.json
View file @
e6e1408e
...
...
@@ -2,7 +2,7 @@
"cache"
:
{
"config"
:
{
"env"
:
"local"
,
"name"
:
"
e
e"
,
"name"
:
"
standalonefram
e"
,
"baseDir"
:
"/Users/wuhao/Desktop/demos/standaloneframe/electron"
,
"HOME"
:
"/Users/wuhao/Desktop/demos/standaloneframe"
,
"rundir"
:
"/Users/wuhao/Desktop/demos/standaloneframe/electron/run"
,
...
...
@@ -11,7 +11,7 @@
},
"homeDir"
:
"/Users/wuhao/Desktop/demos/standaloneframe"
,
"root"
:
"/Users/wuhao/Desktop/demos/standaloneframe"
,
"appUserDataDir"
:
"/Users/wuhao/Library/Application Support/
e
e"
,
"appUserDataDir"
:
"/Users/wuhao/Library/Application Support/
standalonefram
e"
,
"userHome"
:
"/Users/wuhao"
,
"appVersion"
:
"3.4.0"
,
"isPackaged"
:
false
,
...
...
@@ -93,7 +93,7 @@
}
},
"httpServer"
:
{
"enable"
:
fals
e
,
"enable"
:
tru
e
,
"https"
:
{
"enable"
:
false
,
"key"
:
"/public/ssl/localhost+1.key"
,
...
...
@@ -103,7 +103,9 @@
"host"
:
"localhost"
,
"port"
:
7071
,
"cors"
:
{
"origin"
:
"*"
"origin"
:
false
,
"allowMethods"
:
"GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS"
,
"credentials"
:
true
},
"body"
:
{
"multipart"
:
true
,
...
...
electron/config/builder.json
View file @
e6e1408e
{
"productName"
:
"
e
e"
,
"productName"
:
"
standalonefram
e"
,
"appId"
:
"com.electron.ee"
,
"copyright"
:
"© 2023 哆啦好梦 Technology Co., Ltd."
,
"directories"
:
{
...
...
@@ -26,7 +26,7 @@
"installerHeaderIcon"
:
"build/icons/icon.ico"
,
"createDesktopShortcut"
:
true
,
"createStartMenuShortcut"
:
true
,
"shortcutName"
:
"
EE框架
"
"shortcutName"
:
"
制作器-单机版
"
},
"mac"
:
{
"icon"
:
"build/icons/icon.icns"
,
...
...
electron/config/config.default.js
View file @
e6e1408e
'use strict'
;
"use strict"
;
const
path
=
require
(
'path'
);
const
path
=
require
(
"path"
);
/**
* 默认配置
*/
module
.
exports
=
(
appInfo
)
=>
{
const
config
=
{};
/**
* 应用模式配置
*/
config
.
developmentMode
=
{
default
:
'react'
,
default
:
"react"
,
mode
:
{
vue
:
{
hostname
:
'localhost'
,
port
:
4399
hostname
:
"localhost"
,
port
:
4399
,
},
react
:
{
hostname
:
'localhost'
,
port
:
8000
hostname
:
"localhost"
,
port
:
8000
,
},
html
:
{
hostname
:
'localhost'
,
indexPage
:
'index.html'
hostname
:
"localhost"
,
indexPage
:
"index.html"
,
},
}
}
,
};
/**
...
...
@@ -38,13 +37,13 @@ module.exports = (appInfo) => {
/**
* 应用程序顶部菜单
*/
config
.
openAppMenu
=
'dev-show'
;
config
.
openAppMenu
=
"dev-show"
;
/**
* 主窗口
*/
config
.
windowsOption
=
{
title
:
'EE框架'
,
title
:
"EE框架"
,
width
:
980
,
height
:
650
,
minWidth
:
800
,
...
...
@@ -57,35 +56,35 @@ module.exports = (appInfo) => {
},
frame
:
true
,
show
:
false
,
icon
:
path
.
join
(
appInfo
.
home
,
'public'
,
'images'
,
'logo-32.png'
),
icon
:
path
.
join
(
appInfo
.
home
,
"public"
,
"images"
,
"logo-32.png"
),
};
/**
* ee框架日志
*/
*/
config
.
logger
=
{
encoding
:
'utf8'
,
level
:
'INFO'
,
encoding
:
"utf8"
,
level
:
"INFO"
,
outputJSON
:
false
,
buffer
:
true
,
enablePerformanceTimer
:
false
,
rotator
:
'day'
,
appLogName
:
'ee.log'
,
coreLogName
:
'ee-core.log'
,
errorLogName
:
'ee-error.log'
}
rotator
:
"day"
,
appLogName
:
"ee.log"
,
coreLogName
:
"ee-core.log"
,
errorLogName
:
"ee-error.log"
,
}
;
/**
* 远程模式-web地址
*/
*/
config
.
remoteUrl
=
{
enable
:
false
,
url
:
'http://electron-egg.kaka996.com/'
url
:
"http://electron-egg.kaka996.com/"
,
};
/**
* 内置socket服务
*/
*/
config
.
socketServer
=
{
enable
:
false
,
port
:
7070
,
...
...
@@ -97,52 +96,52 @@ module.exports = (appInfo) => {
transports
:
[
"polling"
,
"websocket"
],
cors
:
{
origin
:
true
,
}
}
,
};
/**
* 内置http服务
*/
*/
config
.
httpServer
=
{
enable
:
true
,
https
:
{
enable
:
false
,
key
:
'/public/ssl/localhost+1.key'
,
cert
:
'/public/ssl/localhost+1.pem'
enable
:
false
,
key
:
"/public/ssl/localhost+1.key"
,
cert
:
"/public/ssl/localhost+1.pem"
,
},
port
:
7071
,
cors
:
{
origin
:
"*"
origin
:
false
,
allowMethods
:
"GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS"
,
credentials
:
true
,
},
body
:
{
multipart
:
true
,
formidable
:
{
keepExtensions
:
true
}
keepExtensions
:
true
,
}
,
},
filterRequest
:
{
uris
:
[
'favicon.ico'
],
returnData
:
''
}
uris
:
[
"favicon.ico"
],
returnData
:
""
,
},
};
/**
* 主进程
*/
*/
config
.
mainServer
=
{
protocol
:
'http://'
,
indexPath
:
'/public/dist/index.html'
,
host
:
'localhost'
,
protocol
:
"http://"
,
indexPath
:
"/public/dist/index.html"
,
host
:
"localhost"
,
port
:
7072
,
};
};
/**
* 硬件加速
*/
config
.
hardGpu
=
{
enable
:
false
enable
:
false
,
};
/**
...
...
@@ -152,7 +151,7 @@ module.exports = (appInfo) => {
mainExit
:
false
,
childExit
:
true
,
rendererExit
:
true
,
};
};
/**
* 插件功能
...
...
@@ -163,38 +162,38 @@ module.exports = (appInfo) => {
},
tray
:
{
enable
:
true
,
title
:
'EE程序'
,
icon
:
'/public/images/tray_logo.png'
title
:
"EE程序"
,
icon
:
"/public/images/tray_logo.png"
,
},
security
:
{
enable
:
true
,
},
awaken
:
{
enable
:
true
,
protocol
:
'ee'
,
args
:
[]
protocol
:
"ee"
,
args
:
[]
,
},
autoUpdater
:
{
enable
:
true
,
windows
:
false
,
macOS
:
false
,
windows
:
false
,
macOS
:
false
,
linux
:
false
,
options
:
{
provider
:
'generic'
,
url
:
'http://kodo.qiniu.com/'
provider
:
"generic"
,
url
:
"http://kodo.qiniu.com/"
,
},
force
:
false
,
},
javaServer
:
{
enable
:
false
,
port
:
18080
,
jreVersion
:
'jre1.8.0_201'
,
jreVersion
:
"jre1.8.0_201"
,
opt
:
'-server -Xms512M -Xmx512M -Xss512k -Dspring.profiles.active=prod -Dserver.port=${port} -Dlogging.file.path="${path}" '
,
name
:
'java-app.jar'
}
name
:
"java-app.jar"
,
}
,
};
return
{
...
config
...
config
,
};
}
}
;
electron/config/encrypt.js
View file @
e6e1408e
...
...
@@ -3,18 +3,14 @@
* @param type - confusion | bytecode | strict
*/
module
.
exports
=
{
type
:
'confusion'
,
type
:
"bytecode"
,
directory
:
[
"electron"
],
files
:
[
'electron/**/*.(js|json)'
,
'!electron/config/encrypt.js'
,
'!electron/config/nodemon.json'
,
'!electron/config/builder.json'
,
"electron/**/*.(js|json)"
,
"!electron/config/encrypt.js"
,
"!electron/config/nodemon.json"
,
"!electron/config/builder.json"
,
],
fileExt
:
[
'.js'
],
confusionOptions
:
{
compact
:
true
,
stringArray
:
true
,
stringArrayEncoding
:
[
'none'
],
deadCodeInjection
:
false
,
}
};
\ No newline at end of file
fileExt
:
[
".js"
],
confusionOptions
:
{},
};
electron/controller/example.js
View file @
e6e1408e
'use strict'
;
"use strict"
;
const
{
Controller
}
=
require
(
'ee-core'
);
const
Log
=
require
(
'ee-core/log'
);
const
Services
=
require
(
'ee-core/services'
);
const
{
Controller
}
=
require
(
"ee-core"
);
const
Log
=
require
(
"ee-core/log"
);
const
Services
=
require
(
"ee-core/services"
);
const
db
=
require
(
"../model/index"
);
/**
* example
* @class
*/
class
ExampleController
extends
Controller
{
constructor
(
ctx
)
{
super
(
ctx
);
}
/**
* 所有方法接收两个参数
* @param args 前端传的参数
...
...
@@ -24,13 +23,21 @@ class ExampleController extends Controller {
/**
* test
*/
async
test
()
{
const
result
=
await
Services
.
get
(
'example'
).
test
(
'electron'
);
Log
.
info
(
'service result:'
,
result
);
return
'hello electron-egg'
;
async
test
()
{
const
result
=
await
Services
.
get
(
"example"
).
test
(
"electron"
);
// Log.info("service result:", result, db );
let
res
=
await
db
?.
User
.
create
({
username
:
"丁大炮"
,
email
:
"1148547900@qq.com"
,
});
return
{
code
:
0
,
data
:
res
,
};
}
}
ExampleController
.
toString
=
()
=>
'[class ExampleController]'
;
module
.
exports
=
ExampleController
;
ExampleController
.
toString
=
()
=>
"[class ExampleController]"
;
module
.
exports
=
ExampleController
;
electron/database/config.json
0 → 100644
View file @
e6e1408e
{
"development"
:
{
"dialect"
:
"sqlite"
,
"storage"
:
"./data/database.sqlite"
},
"test"
:
{
"dialect"
:
"sqlite"
,
"storage"
:
"database.sqlite"
},
"production"
:
{
"dialect"
:
"sqlite"
,
"storage"
:
"database.sqlite"
}
}
\ No newline at end of file
electron/database/migrations/20230616091828-create-user.js
0 → 100644
View file @
e6e1408e
'use strict'
;
/** @type {import('sequelize-cli').Migration} */
module
.
exports
=
{
async
up
(
queryInterface
,
Sequelize
)
{
await
queryInterface
.
createTable
(
'Users'
,
{
id
:
{
allowNull
:
false
,
autoIncrement
:
true
,
primaryKey
:
true
,
type
:
Sequelize
.
INTEGER
},
username
:
{
type
:
Sequelize
.
STRING
},
email
:
{
type
:
Sequelize
.
STRING
},
createdAt
:
{
allowNull
:
false
,
type
:
Sequelize
.
DATE
},
updatedAt
:
{
allowNull
:
false
,
type
:
Sequelize
.
DATE
}
});
},
async
down
(
queryInterface
,
Sequelize
)
{
await
queryInterface
.
dropTable
(
'Users'
);
}
};
\ No newline at end of file
electron/model/index.js
View file @
e6e1408e
'use strict'
;
const
fs
=
require
(
'fs'
);
const
path
=
require
(
'path'
);
const
Sequelize
=
require
(
'sequelize'
);
const
process
=
require
(
'process'
);
const
basename
=
path
.
basename
(
__filename
);
const
env
=
process
.
env
.
NODE_ENV
||
'development'
;
const
config
=
require
(
__dirname
+
'/../../data/config.json'
)[
env
];
"use strict"
;
const
fs
=
require
(
"fs"
);
const
path
=
require
(
"path"
);
const
Sequelize
=
require
(
"sequelize"
);
const
process
=
require
(
"process"
);
const
basename
=
"index.js"
;
const
env
=
process
.
env
.
NODE_ENV
||
"development"
;
const
config
=
require
(
"../database/config.json"
)[
env
];
const
db
=
{};
let
sequelize
;
if
(
config
.
use_env_variable
)
{
sequelize
=
new
Sequelize
(
process
.
env
[
config
.
use_env_variable
],
config
);
}
else
{
sequelize
=
new
Sequelize
(
config
.
database
,
config
.
username
,
config
.
password
,
config
);
sequelize
=
new
Sequelize
(
config
.
database
,
config
.
username
,
config
.
password
,
config
);
}
fs
.
readdirSync
(
__dirname
)
.
filter
(
file
=>
{
fs
.
readdirSync
(
__dirname
)
.
filter
((
file
)
=>
{
return
(
file
.
indexOf
(
'.'
)
!==
0
&&
file
.
indexOf
(
"."
)
!==
0
&&
file
!==
basename
&&
file
.
slice
(
-
3
)
===
'.js'
&&
file
.
indexOf
(
'.test.js'
)
===
-
1
file
.
slice
(
-
3
)
===
".js"
&&
file
.
indexOf
(
".test.js"
)
===
-
1
);
})
.
forEach
(
file
=>
{
const
model
=
require
(
path
.
join
(
__dirname
,
file
))(
sequelize
,
Sequelize
.
DataTypes
);
.
forEach
((
file
)
=>
{
const
model
=
require
(
path
.
join
(
__dirname
,
file
))(
sequelize
,
Sequelize
.
DataTypes
);
db
[
model
.
name
]
=
model
;
});
Object
.
keys
(
db
).
forEach
(
modelName
=>
{
Object
.
keys
(
db
).
forEach
(
(
modelName
)
=>
{
if
(
db
[
modelName
].
associate
)
{
db
[
modelName
].
associate
(
db
);
}
...
...
frontend/config/env.js
View file @
e6e1408e
export
default
{
dev
:{
"REACT_APP_URL"
:
"http://
118.89.86.27:700
1"
//"http://118.89.86.27:7001"
"REACT_APP_URL"
:
"http://
localhost:707
1"
//"http://118.89.86.27:7001"
},
test
:{
"REACT_APP_URL"
:
"http://localhost:7001"
},
prod
:{
"REACT_APP_URL"
:
"http://
118.89.86.27:700
1"
"REACT_APP_URL"
:
"http://
localhost:707
1"
}
}
frontend/src/.umi-production/core/defineApp.ts
View file @
e6e1408e
// @ts-nocheck
// This file is generated by Umi automatically
// DO NOT CHANGE IT MANUALLY!
import
type
{
IRuntimeConfig
as
Plugin0
}
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/src/.umi-production/plugin-antd/runtimeConfig.d'
import
type
{
IRuntimeConfig
as
Plugin1
}
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/src/.umi-production/plugin-initialState/runtimeConfig.d'
import
type
{
IRuntimeConfig
as
Plugin0
}
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/src/.umi-production/plugin-antd/runtimeConfig.d'
import
type
{
IRuntimeConfig
as
Plugin1
}
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/src/.umi-production/plugin-initialState/runtimeConfig.d'
interface
IDefaultRuntimeConfig
{
onRouteChange
?:
(
props
:
{
routes
:
any
,
clientRoutes
:
any
,
location
:
any
,
action
:
any
,
isFirst
:
boolean
})
=>
void
;
patchRoutes
?:
(
props
:
{
routes
:
any
})
=>
void
;
...
...
frontend/src/.umi-production/core/helmet.ts
View file @
e6e1408e
...
...
@@ -2,7 +2,7 @@
// This file is generated by Umi automatically
// DO NOT CHANGE IT MANUALLY!
import
React
from
'react'
;
import
{
HelmetProvider
}
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/node_modules/@umijs/renderer-react'
;
import
{
HelmetProvider
}
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/node_modules/@umijs/renderer-react'
;
import
{
context
}
from
'./helmetContext'
;
export
const
innerProvider
=
(
container
)
=>
{
...
...
frontend/src/.umi-production/core/history.ts
View file @
e6e1408e
// @ts-nocheck
// This file is generated by Umi automatically
// DO NOT CHANGE IT MANUALLY!
import
{
createHashHistory
,
createMemoryHistory
,
createBrowserHistory
}
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/node_modules/@umijs/renderer-react'
;
import
{
createHashHistory
,
createMemoryHistory
,
createBrowserHistory
}
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/node_modules/@umijs/renderer-react'
;
import
type
{
UmiHistory
}
from
'./historyIntelli'
;
let
history
:
UmiHistory
;
...
...
frontend/src/.umi-production/core/historyIntelli.ts
View file @
e6e1408e
...
...
@@ -2,7 +2,7 @@
// This file is generated by Umi automatically
// DO NOT CHANGE IT MANUALLY!
import
{
getRoutes
}
from
'./route'
import
type
{
History
}
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/node_modules/@umijs/renderer-react'
import
type
{
History
}
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/node_modules/@umijs/renderer-react'
type
Routes
=
Awaited
<
ReturnType
<
typeof
getRoutes
>>
[
'routes'
]
type
AllRoute
=
Routes
[
keyof
Routes
]
...
...
frontend/src/.umi-production/core/plugin.ts
View file @
e6e1408e
// @ts-nocheck
// This file is generated by Umi automatically
// DO NOT CHANGE IT MANUALLY!
import
*
as
Plugin_0
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/src/app.jsx'
;
import
*
as
Plugin_0
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/src/app.jsx'
;
import
*
as
Plugin_1
from
'@@/core/helmet.ts'
;
import
*
as
Plugin_2
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/src/.umi-production/plugin-initialState/runtime.tsx'
;
import
*
as
Plugin_3
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/src/.umi-production/plugin-model/runtime.tsx'
;
import
*
as
Plugin_2
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/src/.umi-production/plugin-initialState/runtime.tsx'
;
import
*
as
Plugin_3
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/src/.umi-production/plugin-model/runtime.tsx'
;
import
{
PluginManager
}
from
'umi'
;
function
__defaultExport
(
obj
)
{
...
...
@@ -17,7 +17,7 @@ export function getPlugins() {
return
[
{
apply
:
__defaultExport
(
Plugin_0
),
path
:
process
.
env
.
NODE_ENV
===
'production'
?
void
0
:
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/src/app.jsx'
,
path
:
process
.
env
.
NODE_ENV
===
'production'
?
void
0
:
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/src/app.jsx'
,
},
{
apply
:
Plugin_1
,
...
...
@@ -25,11 +25,11 @@ export function getPlugins() {
},
{
apply
:
Plugin_2
,
path
:
process
.
env
.
NODE_ENV
===
'production'
?
void
0
:
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/src/.umi-production/plugin-initialState/runtime.tsx'
,
path
:
process
.
env
.
NODE_ENV
===
'production'
?
void
0
:
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/src/.umi-production/plugin-initialState/runtime.tsx'
,
},
{
apply
:
Plugin_3
,
path
:
process
.
env
.
NODE_ENV
===
'production'
?
void
0
:
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/src/.umi-production/plugin-model/runtime.tsx'
,
path
:
process
.
env
.
NODE_ENV
===
'production'
?
void
0
:
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/src/.umi-production/plugin-model/runtime.tsx'
,
},
];
}
...
...
frontend/src/.umi-production/core/polyfill.ts
View file @
e6e1408e
This diff is collapsed.
Click to expand it.
frontend/src/.umi-production/core/route.tsx
View file @
e6e1408e
...
...
@@ -16,7 +16,7 @@ export async function getRoutes() {
'6'
:
React
.
lazy
(()
=>
import
(
/* webpackChunkName: "p__port__index" */
'@/pages/port/index.jsx'
)),
'7'
:
React
.
lazy
(()
=>
import
(
/* webpackChunkName: "p__report__index" */
'@/pages/report/index.jsx'
)),
'8'
:
React
.
lazy
(()
=>
import
(
/* webpackChunkName: "p__mycenter__index" */
'@/pages/mycenter/index.jsx'
)),
'@@/global-layout'
:
React
.
lazy
(()
=>
import
(
/* webpackChunkName: "layouts__index" */
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/src/layouts/index.jsx'
)),
'@@/global-layout'
:
React
.
lazy
(()
=>
import
(
/* webpackChunkName: "layouts__index" */
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/src/layouts/index.jsx'
)),
},
};
}
frontend/src/.umi-production/exports.ts
View file @
e6e1408e
...
...
@@ -4,13 +4,13 @@
export
{
defineApp
}
from
'./core/defineApp'
export
type
{
RuntimeConfig
}
from
'./core/defineApp'
// @umijs/renderer-*
export
{
createBrowserHistory
,
createHashHistory
,
createMemoryHistory
,
Helmet
,
HelmetProvider
,
createSearchParams
,
generatePath
,
matchPath
,
matchRoutes
,
Navigate
,
NavLink
,
Outlet
,
resolvePath
,
useLocation
,
useMatch
,
useNavigate
,
useOutlet
,
useOutletContext
,
useParams
,
useResolvedPath
,
useRoutes
,
useSearchParams
,
useAppData
,
useClientLoaderData
,
useRouteProps
,
useSelectedRoutes
,
useServerLoaderData
,
renderClient
,
__getRoot
,
Link
,
useRouteData
,
__useFetcher
,
withRouter
}
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/node_modules/@umijs/renderer-react'
;
export
type
{
History
}
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/node_modules/@umijs/renderer-react'
export
{
createBrowserHistory
,
createHashHistory
,
createMemoryHistory
,
Helmet
,
HelmetProvider
,
createSearchParams
,
generatePath
,
matchPath
,
matchRoutes
,
Navigate
,
NavLink
,
Outlet
,
resolvePath
,
useLocation
,
useMatch
,
useNavigate
,
useOutlet
,
useOutletContext
,
useParams
,
useResolvedPath
,
useRoutes
,
useSearchParams
,
useAppData
,
useClientLoaderData
,
useRouteProps
,
useSelectedRoutes
,
useServerLoaderData
,
renderClient
,
__getRoot
,
Link
,
useRouteData
,
__useFetcher
,
withRouter
}
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/node_modules/@umijs/renderer-react'
;
export
type
{
History
}
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/node_modules/@umijs/renderer-react'
// umi/client/client/plugin
export
{
ApplyPluginsType
,
PluginManager
}
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/node_modules/umi/client/client/plugin.js'
;
export
{
ApplyPluginsType
,
PluginManager
}
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/node_modules/umi/client/client/plugin.js'
;
export
{
history
,
createHistory
}
from
'./core/history'
;
export
{
terminal
}
from
'./core/terminal'
;
// plugins
export
{
Provider
,
useModel
}
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/src/.umi-production/plugin-model'
;
export
{
Provider
,
useModel
}
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/src/.umi-production/plugin-model'
;
// plugins types.d.ts
export
*
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/src/.umi-production/plugin-antd/types.d'
;
export
*
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/src/.umi-production/plugin-antd/types.d'
;
frontend/src/.umi-production/plugin-model/index.tsx
View file @
e6e1408e
...
...
@@ -3,7 +3,7 @@
// DO NOT CHANGE IT MANUALLY!
// @ts-ignore
import
type
{
models
as
rawModels
}
from
'@@/plugin-model/model'
;
import
isEqual
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/node_modules/fast-deep-equal/index.js'
;
import
isEqual
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/node_modules/fast-deep-equal/index.js'
;
import
React
,
{
useContext
,
useEffect
,
useMemo
,
useRef
,
useState
}
from
'react'
;
type
Models
=
typeof
rawModels
;
...
...
frontend/src/.umi-production/plugin-model/model.ts
View file @
e6e1408e
// @ts-nocheck
// This file is generated by Umi automatically
// DO NOT CHANGE IT MANUALLY!
import
model_1
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/src/.umi-production/plugin-initialState/@@initialState'
;
import
model_1
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/src/.umi-production/plugin-initialState/@@initialState'
;
export
const
models
=
{
model_1
:
{
namespace
:
'@@initialState'
,
model
:
model_1
},
...
...
frontend/src/.umi-production/testBrowser.tsx
View file @
e6e1408e
...
...
@@ -3,13 +3,13 @@
// DO NOT CHANGE IT MANUALLY!
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
ApplyPluginsType
}
from
'umi'
;
import
{
renderClient
,
RenderClientOpts
}
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/node_modules/@umijs/renderer-react'
;
import
{
renderClient
,
RenderClientOpts
}
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/node_modules/@umijs/renderer-react'
;
import
{
createHistory
}
from
'./core/history'
;
import
{
createPluginManager
}
from
'./core/plugin'
;
import
{
getRoutes
}
from
'./core/route'
;
import
type
{
Location
}
from
'history'
;
import
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/src/global.less'
;
import
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/src/global.less'
;
import
'antd/dist/reset.css'
;
const
publicPath
=
'/'
;
const
runtimePublicPath
=
false
;
...
...
frontend/src/.umi-production/tsconfig.json
View file @
e6e1408e
...
...
@@ -27,7 +27,7 @@
"src/.umi/*"
],
"umi"
:
[
"/Users/wuhao/Desktop/demos/
electron-egg
/frontend/node_modules/umi"
"/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/node_modules/umi"
],
"umi/typings"
:
[
"src/.umi/typings"
...
...
frontend/src/.umi-production/umi.ts
View file @
e6e1408e
...
...
@@ -2,9 +2,9 @@
// This file is generated by Umi automatically
// DO NOT CHANGE IT MANUALLY!
import
'./core/polyfill'
;
import
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/src/global.less'
;
import
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/src/global.less'
;
import
'antd/dist/reset.css'
;
import
{
renderClient
}
from
'/Users/wuhao/Desktop/demos/
electron-egg
/frontend/node_modules/@umijs/renderer-react'
;
import
{
renderClient
}
from
'/Users/wuhao/Desktop/demos/
standaloneframe
/frontend/node_modules/@umijs/renderer-react'
;
import
{
getRoutes
}
from
'./core/route'
;
import
{
createPluginManager
}
from
'./core/plugin'
;
import
{
createHistory
}
from
'./core/history'
;
...
...
frontend/src/pages/user/login.jsx
View file @
e6e1408e
import
Footer
from
"@/components/Footer"
;
import
{
doFetch
,
postFetch
}
from
"@/utils/doFetch"
;
import
{
doFetch
,
postFetch
,
getFetch
}
from
"@/utils/doFetch"
;
import
{
LockOutlined
,
UserOutlined
,
RedoOutlined
}
from
"@ant-design/icons"
;
import
{
LoginForm
,
...
...
@@ -8,7 +8,7 @@ import {
}
from
"@ant-design/pro-components"
;
import
{
history
,
useModel
,
useOutletContext
}
from
"umi"
;
import
{
Card
,
Dropdown
,
message
,
Tabs
,
QRCode
}
from
"antd"
;
import
{
useState
}
from
"react"
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
ipc
}
from
"@/utils/ipcRenderer"
;
...
...
@@ -60,6 +60,13 @@ const Login = () => {
const
[
loginType
,
setLoginType
]
=
useState
(
"account"
);
useEffect
(()
=>
{
getFetch
({
url
:
"/controller/example/test"
,
params
:{}})
},
[]);
return
(
<
div
className=
"noline"
...
...
package.json
View file @
e6e1408e
{
"name"
:
"
e
e"
,
"name"
:
"
standalonefram
e"
,
"version"
:
"3.4.0"
,
"description"
:
"A fast, desktop software development framework"
,
"main"
:
"main.js"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment