perf: 优化本地资源加载方式

This commit is contained in:
kuaifan 2025-06-04 07:02:19 +08:00
parent e29bd01f68
commit 489e5b551c
4 changed files with 22 additions and 1 deletions

10
public/assets/empty.html Normal file
View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Empty</title>
</head>
<body>
</body>
</html>

View File

@ -111,6 +111,7 @@ export default {
microApp.start({
'iframe': true,
'router-mode': 'state',
'iframeSrc': window.location.origin + '/assets/empty.html',
})
},

View File

@ -19,7 +19,7 @@ const convertLocalResourcePath = (() => {
// 设置应用前缀URL
if ($A.isEEUIApp || $A.isElectron) {
appPreUrl = window.origin + "/"
appPreUrl = window.location.origin + "/"
}
// 如果没有特殊前缀,提前返回

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Empty</title>
</head>
<body>
</body>
</html>