Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
genary
uni-app
提交
a391cdaf
U
uni-app
项目概览
genary
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a391cdaf
编写于
6月 24, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wip(app): uni-app-vite
上级
cb81e195
变更
42
展开全部
隐藏空白更改
内联
并排
Showing
42 changed file
with
20682 addition
and
106 deletion
+20682
-106
packages/shims-uni-app.d.ts
packages/shims-uni-app.d.ts
+5
-0
packages/uni-app-plus/dist/uni-app-view.umd.js
packages/uni-app-plus/dist/uni-app-view.umd.js
+3
-15
packages/uni-app-vite/dist/index.js
packages/uni-app-vite/dist/index.js
+2
-0
packages/uni-app-vite/dist/plugins/copy.js
packages/uni-app-vite/dist/plugins/copy.js
+30
-0
packages/uni-app-vite/lib/template/__uniappchooselocation.js
packages/uni-app-vite/lib/template/__uniappchooselocation.js
+2181
-0
packages/uni-app-vite/lib/template/__uniapperror.png
packages/uni-app-vite/lib/template/__uniapperror.png
+0
-0
packages/uni-app-vite/lib/template/__uniappopenlocation.js
packages/uni-app-vite/lib/template/__uniappopenlocation.js
+1170
-0
packages/uni-app-vite/lib/template/__uniapppicker.js
packages/uni-app-vite/lib/template/__uniapppicker.js
+1896
-0
packages/uni-app-vite/lib/template/__uniappquill.js
packages/uni-app-vite/lib/template/__uniappquill.js
+12158
-0
packages/uni-app-vite/lib/template/__uniappquillimageresize.js
...ges/uni-app-vite/lib/template/__uniappquillimageresize.js
+1677
-0
packages/uni-app-vite/lib/template/__uniappscan.js
packages/uni-app-vite/lib/template/__uniappscan.js
+1262
-0
packages/uni-app-vite/lib/template/__uniappsuccess.png
packages/uni-app-vite/lib/template/__uniappsuccess.png
+0
-0
packages/uni-app-vite/lib/template/__uniappview.html
packages/uni-app-vite/lib/template/__uniappview.html
+13
-0
packages/uni-app-vite/package.json
packages/uni-app-vite/package.json
+2
-1
packages/uni-app-vite/src/index.ts
packages/uni-app-vite/src/index.ts
+2
-0
packages/uni-app-vite/src/plugins/copy.ts
packages/uni-app-vite/src/plugins/copy.ts
+27
-0
packages/uni-cli-shared/package.json
packages/uni-cli-shared/package.json
+1
-0
packages/uni-cli-shared/src/json/app/manifest/arguments.ts
packages/uni-cli-shared/src/json/app/manifest/arguments.ts
+12
-3
packages/uni-cli-shared/src/json/app/manifest/confusion.ts
packages/uni-cli-shared/src/json/app/manifest/confusion.ts
+32
-0
packages/uni-cli-shared/src/json/app/manifest/defaultManifestJson.ts
...i-cli-shared/src/json/app/manifest/defaultManifestJson.ts
+0
-1
packages/uni-cli-shared/src/json/app/manifest/index.ts
packages/uni-cli-shared/src/json/app/manifest/index.ts
+14
-5
packages/uni-cli-shared/src/json/app/manifest/launchwebview.ts
...ges/uni-cli-shared/src/json/app/manifest/launchwebview.ts
+29
-0
packages/uni-cli-shared/src/json/app/manifest/merge.ts
packages/uni-cli-shared/src/json/app/manifest/merge.ts
+2
-2
packages/uni-cli-shared/src/json/app/manifest/nvue.ts
packages/uni-cli-shared/src/json/app/manifest/nvue.ts
+1
-1
packages/uni-cli-shared/src/json/app/manifest/plus.ts
packages/uni-cli-shared/src/json/app/manifest/plus.ts
+24
-2
packages/uni-cli-shared/src/json/app/manifest/safearea.ts
packages/uni-cli-shared/src/json/app/manifest/safearea.ts
+2
-6
packages/uni-cli-shared/src/json/app/manifest/statusbar.ts
packages/uni-cli-shared/src/json/app/manifest/statusbar.ts
+6
-7
packages/uni-cli-shared/src/json/app/manifest/tabBar.ts
packages/uni-cli-shared/src/json/app/manifest/tabBar.ts
+34
-0
packages/uni-cli-shared/src/json/app/manifest/uniApp.ts
packages/uni-cli-shared/src/json/app/manifest/uniApp.ts
+28
-0
packages/uni-cli-shared/src/json/app/pages/uniConfig.ts
packages/uni-cli-shared/src/json/app/pages/uniConfig.ts
+1
-0
packages/uni-cli-shared/src/vite/plugins/copy.ts
packages/uni-cli-shared/src/vite/plugins/copy.ts
+3
-0
packages/uni-cli-shared/src/vite/plugins/index.ts
packages/uni-cli-shared/src/vite/plugins/index.ts
+1
-0
packages/uni-core/src/service/plugin/page.ts
packages/uni-core/src/service/plugin/page.ts
+1
-1
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+2
-14
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+22
-14
packages/uni-shared/dist/uni-shared.cjs.js
packages/uni-shared/dist/uni-shared.cjs.js
+2
-0
packages/uni-shared/dist/uni-shared.d.ts
packages/uni-shared/dist/uni-shared.d.ts
+2
-0
packages/uni-shared/dist/uni-shared.es.js
packages/uni-shared/dist/uni-shared.es.js
+2
-1
packages/uni-shared/src/constants.ts
packages/uni-shared/src/constants.ts
+1
-0
packages/vite-plugin-uni/package.json
packages/vite-plugin-uni/package.json
+0
-1
packages/vite-plugin-uni/src/configResolved/plugins/copy.ts
packages/vite-plugin-uni/src/configResolved/plugins/copy.ts
+3
-3
yarn.lock
yarn.lock
+29
-29
未找到文件。
packages/shims-uni-app.d.ts
浏览文件 @
a391cdaf
...
...
@@ -148,6 +148,7 @@ declare namespace UniApp {
navigationBar
:
PageNavigationBar
refreshOptions
?:
PageRefreshOptions
onReachBottomDistance
?:
number
pageOrientation
?:
'
auto
'
|
'
portrait
'
|
'
landscape
'
}
interface
PageRouteMeta
extends
PagesJsonPageStyle
{
id
?:
number
...
...
@@ -194,6 +195,10 @@ declare namespace UniApp {
[
name
:
string
]:
string
}
}
condition
?:
{
current
?:
number
list
?:
{
name
?:
string
;
path
:
string
;
query
?:
string
}[]
}
}
interface
TabBarItemBaseOptions
{
...
...
packages/uni-app-plus/dist/uni-app-view.umd.js
浏览文件 @
a391cdaf
...
...
@@ -705,7 +705,7 @@
}
};
}
const
ServiceJSBridge
=
/* @__PURE__ */
extend
(
initBridge
(
"
service
"
),
{
/* @__PURE__ */
extend
(
initBridge
(
"
service
"
),
{
invokeOnCallback
(
name
,
res
)
{
return
UniServiceJSBridge
.
emit
(
"
api.
"
+
name
,
res
);
}
...
...
@@ -1489,20 +1489,8 @@
resetSize
};
}
const
canvasEventCallbacks
=
createCallbacks
(
"
canvasEvent
"
);
ServiceJSBridge
.
subscribe
(
"
onCanvasMethodCallback
"
,
({
callbackId
,
data
})
=>
{
const
callback
=
canvasEventCallbacks
.
pop
(
callbackId
);
if
(
callback
)
{
callback
(
data
);
}
});
const
getSelectedTextRangeEventCallbacks
=
createCallbacks
(
"
getSelectedTextRangeEvent
"
);
ServiceJSBridge
.
subscribe
&&
ServiceJSBridge
.
subscribe
(
"
onGetSelectedTextRange
"
,
({
callbackId
,
data
})
=>
{
const
callback
=
getSelectedTextRangeEventCallbacks
.
pop
(
callbackId
);
if
(
callback
)
{
callback
(
data
);
}
});
createCallbacks
(
"
canvasEvent
"
);
createCallbacks
(
"
getSelectedTextRangeEvent
"
);
function
_isSlot
(
s
)
{
return
typeof
s
===
"
function
"
||
Object
.
prototype
.
toString
.
call
(
s
)
===
"
[object Object]
"
&&
!
vue
.
isVNode
(
s
);
}
...
...
packages/uni-app-vite/dist/index.js
浏览文件 @
a391cdaf
"
use strict
"
;
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
const
plugin_1
=
require
(
"
./plugin
"
);
const
copy_1
=
require
(
"
./plugins/copy
"
);
const
mainJs_1
=
require
(
"
./plugins/mainJs
"
);
const
manifestJson_1
=
require
(
"
./plugins/manifestJson
"
);
const
pagesJson_1
=
require
(
"
./plugins/pagesJson
"
);
exports
.
default
=
[
copy_1
.
uniCopyPlugin
(),
mainJs_1
.
uniMainJsPlugin
(),
manifestJson_1
.
uniManifestJsonPlugin
(),
pagesJson_1
.
uniPagesJsonPlugin
(),
...
...
packages/uni-app-vite/dist/plugins/copy.js
0 → 100644
浏览文件 @
a391cdaf
"
use strict
"
;
var
__importDefault
=
(
this
&&
this
.
__importDefault
)
||
function
(
mod
)
{
return
(
mod
&&
mod
.
__esModule
)
?
mod
:
{
"
default
"
:
mod
};
};
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
uniCopyPlugin
=
void
0
;
const
path_1
=
__importDefault
(
require
(
"
path
"
));
const
slash_1
=
__importDefault
(
require
(
"
slash
"
));
const
uni_cli_shared_1
=
require
(
"
@dcloudio/uni-cli-shared
"
);
function
uniCopyPlugin
()
{
return
uni_cli_shared_1
.
uniViteCopyPlugin
({
targets
:
[
{
src
:
slash_1
.
default
(
path_1
.
default
.
resolve
(
__dirname
,
'
../../lib/template/
'
)),
dest
:
process
.
env
.
UNI_OUTPUT_DIR
,
},
{
src
:
slash_1
.
default
(
require
.
resolve
(
'
@dcloudio/uni-app-plus/dist/style.css
'
)),
dest
:
process
.
env
.
UNI_OUTPUT_DIR
,
},
{
src
:
slash_1
.
default
(
require
.
resolve
(
'
@dcloudio/uni-app-plus/dist/uni-app-view.umd.js
'
)),
dest
:
process
.
env
.
UNI_OUTPUT_DIR
,
},
],
hook
:
'
writeBundle
'
,
verbose
:
process
.
env
.
DEBUG
?
true
:
false
,
});
}
exports
.
uniCopyPlugin
=
uniCopyPlugin
;
packages/uni-app-vite/lib/template/__uniappchooselocation.js
0 → 100644
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/uni-app-vite/lib/template/__uniapperror.png
0 → 100644
浏览文件 @
a391cdaf
5.7 KB
packages/uni-app-vite/lib/template/__uniappopenlocation.js
0 → 100644
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/uni-app-vite/lib/template/__uniapppicker.js
0 → 100644
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/uni-app-vite/lib/template/__uniappquill.js
0 → 100644
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/uni-app-vite/lib/template/__uniappquillimageresize.js
0 → 100644
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/uni-app-vite/lib/template/__uniappscan.js
0 → 100644
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/uni-app-vite/lib/template/__uniappsuccess.png
0 → 100644
浏览文件 @
a391cdaf
2.0 KB
packages/uni-app-vite/lib/template/__uniappview.html
0 → 100644
浏览文件 @
a391cdaf
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<title>
View
</title>
<link
rel=
"stylesheet"
href=
"style.css"
/>
</head>
<body>
<div
id=
"app"
></div>
<script
src=
"uni-app-view.umd.js"
></script>
</body>
</html>
packages/uni-app-vite/package.json
浏览文件 @
a391cdaf
...
...
@@ -6,7 +6,8 @@
"types"
:
"dist/index.d.ts"
,
"files"
:
[
"dist/**/*.js"
,
"dist/**/*.d.ts"
"dist/**/*.d.ts"
,
"lib"
],
"repository"
:
{
"type"
:
"git"
,
...
...
packages/uni-app-vite/src/index.ts
浏览文件 @
a391cdaf
import
{
UniAppPlugin
}
from
'
./plugin
'
import
{
uniCopyPlugin
}
from
'
./plugins/copy
'
import
{
uniMainJsPlugin
}
from
'
./plugins/mainJs
'
import
{
uniManifestJsonPlugin
}
from
'
./plugins/manifestJson
'
import
{
uniPagesJsonPlugin
}
from
'
./plugins/pagesJson
'
export
default
[
uniCopyPlugin
(),
uniMainJsPlugin
(),
uniManifestJsonPlugin
(),
uniPagesJsonPlugin
(),
...
...
packages/uni-app-vite/src/plugins/copy.ts
0 → 100644
浏览文件 @
a391cdaf
import
path
from
'
path
'
import
slash
from
'
slash
'
import
{
uniViteCopyPlugin
}
from
'
@dcloudio/uni-cli-shared
'
export
function
uniCopyPlugin
()
{
return
uniViteCopyPlugin
({
targets
:
[
{
src
:
slash
(
path
.
resolve
(
__dirname
,
'
../../lib/template/
'
)),
dest
:
process
.
env
.
UNI_OUTPUT_DIR
,
},
{
src
:
slash
(
require
.
resolve
(
'
@dcloudio/uni-app-plus/dist/style.css
'
)),
dest
:
process
.
env
.
UNI_OUTPUT_DIR
,
},
{
src
:
slash
(
require
.
resolve
(
'
@dcloudio/uni-app-plus/dist/uni-app-view.umd.js
'
)
),
dest
:
process
.
env
.
UNI_OUTPUT_DIR
,
},
],
hook
:
'
writeBundle
'
,
verbose
:
process
.
env
.
DEBUG
?
true
:
false
,
})
}
packages/uni-cli-shared/package.json
浏览文件 @
a391cdaf
...
...
@@ -25,6 +25,7 @@
"estree-walker"
:
"^2.0.2"
,
"jsonc-parser"
:
"^3.0.0"
,
"merge"
:
"^2.1.1"
,
"rollup-plugin-copy"
:
"^3.4.0"
,
"slash"
:
"^3.0.0"
,
"tapable"
:
"^2.2.0"
,
"xregexp"
:
"3.1.0"
...
...
packages/uni-cli-shared/src/json/app/manifest/arguments.ts
浏览文件 @
a391cdaf
export
function
initArguments
(
manifestJson
:
Record
<
string
,
any
>
,
pagesJson
:
Record
<
string
,
any
>
pagesJson
:
UniApp
.
PagesJson
)
{
if
(
process
.
env
.
NODE_ENV
!==
'
development
'
)
{
return
}
// 指定了入口
if
(
process
.
env
.
UNI_CLI_LAUNCH_PAGE_PATH
)
{
manifestJson
.
plus
.
arguments
=
JSON
.
stringify
({
path
:
process
.
env
.
UNI_CLI_LAUNCH_PAGE_PATH
,
query
:
process
.
env
.
UNI_CLI_LAUNCH_PAGE_QUERY
,
})
return
}
const
condition
=
pagesJson
.
condition
if
(
condition
&&
Array
.
isArray
(
condition
.
list
)
&&
condition
.
list
.
length
)
{
if
(
condition
&&
condition
.
list
?
.
length
)
{
const
list
=
condition
.
list
let
current
=
parseInt
(
condition
.
current
)
||
0
let
current
=
condition
.
current
||
0
if
(
current
<
0
)
{
current
=
0
}
...
...
packages/uni-cli-shared/src/json/app/manifest/confusion.ts
0 → 100644
浏览文件 @
a391cdaf
import
path
from
'
path
'
export
function
initConfusion
(
manifestJson
:
Record
<
string
,
any
>
)
{
if
(
!
manifestJson
.
plus
.
confusion
?.
resources
)
{
return
}
const
resources
=
manifestJson
.
plus
.
confusion
.
resources
as
Record
<
string
,
string
>
manifestJson
.
plus
.
confusion
.
resources
=
Object
.
keys
(
resources
).
reduce
(
(
res
,
name
)
=>
{
const
extname
=
path
.
extname
(
name
)
if
(
extname
===
'
.nvue
'
)
{
res
[
name
.
replace
(
'
.nvue
'
,
'
.js
'
)]
=
resources
[
name
]
}
else
if
(
extname
===
'
.js
'
)
{
// 仅指定目录的js允许加密
if
(
name
.
indexOf
(
'
hybrid/html
'
)
===
0
||
name
.
indexOf
(
'
static/
'
)
===
0
||
name
.
indexOf
(
'
/static/
'
)
!==
-
1
// subpackages, uni_modules 中的 static 目录
)
{
res
[
name
]
=
resources
[
name
]
}
}
else
{
throw
new
Error
(
`原生混淆仅支持 nvue 页面,错误的页面路径:
${
name
}
`
)
}
// TODO 旧编译器会检查要加密的 nvue 页面(包括subnvue)是否被使用?后续有时间再考虑支持吧,意义不太大
return
res
},
{}
as
Record
<
string
,
string
>
)
}
packages/uni-cli-shared/src/json/app/manifest/defaultManifestJson.ts
浏览文件 @
a391cdaf
...
...
@@ -15,7 +15,6 @@ const defaultManifestJson = `{
"code": ""
},
"description": "",
"launch_path": "__uniappservice.html",
"developer": {
"name": "",
"email": "",
...
...
packages/uni-cli-shared/src/json/app/manifest/index.ts
浏览文件 @
a391cdaf
...
...
@@ -6,20 +6,29 @@ import { initNVue } from './nvue'
import
{
initArguments
}
from
'
./arguments
'
import
{
initSafearea
}
from
'
./safearea
'
import
{
initSplashscreen
}
from
'
./splashscreen
'
import
{
initConfusion
}
from
'
./confusion
'
import
{
initUniApp
}
from
'
./uniApp
'
import
{
initLaunchwebview
}
from
'
./launchwebview
'
import
{
initTabBar
}
from
'
./tabBar
'
export
function
normalizeAppManifestJson
(
userManifestJson
:
Record
<
string
,
any
>
,
pagesJson
:
Record
<
string
,
any
>
pagesJson
:
UniApp
.
PagesJson
)
{
const
manifestJson
=
initDefaultManifestJson
()
const
manifestJson
=
initRecursiveMerge
(
initAppStatusbar
(
initDefaultManifestJson
(),
pagesJson
),
userManifestJson
)
initAppStatusbar
(
manifestJson
,
pagesJson
)
initRecursiveMerge
(
manifestJson
,
userManifestJson
)
initArguments
(
manifestJson
,
pagesJson
)
initPlus
(
manifestJson
,
userManifest
Json
)
initPlus
(
manifestJson
,
pages
Json
)
initNVue
(
manifestJson
,
pagesJson
)
initSafearea
(
manifestJson
,
pagesJson
)
initSplashscreen
(
manifestJson
,
userManifestJson
)
initConfusion
(
manifestJson
)
initUniApp
(
manifestJson
)
initLaunchwebview
(
manifestJson
,
pagesJson
)
// 依赖 initArguments 先执行
initTabBar
(
manifestJson
,
pagesJson
)
// 依赖 initLaunchwebview 先执行
return
manifestJson
}
...
...
packages/uni-cli-shared/src/json/app/manifest/launchwebview.ts
0 → 100644
浏览文件 @
a391cdaf
import
{
extend
}
from
'
@vue/shared
'
export
function
initLaunchwebview
(
manifestJson
:
Record
<
string
,
any
>
,
pagesJson
:
UniApp
.
PagesJson
)
{
let
entryPagePath
=
pagesJson
.
pages
[
0
].
path
// 依赖前置执行initArguments
if
(
manifestJson
.
plus
.
arguments
)
{
try
{
const
args
=
JSON
.
parse
(
manifestJson
.
plus
.
arguments
)
if
(
args
.
path
)
{
entryPagePath
=
args
.
path
}
}
catch
(
e
)
{}
}
// 标记入口页,方便后边的 initTabBar 使用
process
.
env
.
UNI_ENTRY_PAGE_PATH
=
entryPagePath
manifestJson
.
plus
.
useragent
.
value
=
'
uni-app
'
manifestJson
.
launch_path
=
'
__uniappview.html
'
extend
(
manifestJson
.
plus
.
launchwebview
,
{
id
:
'
1
'
,
kernel
:
'
WKWebview
'
,
})
// TODO 纯原生渲染
// TODO 首页为nvue
// manifestJson.plus.launchwebview.uniNView = {path:'.js'}
// manifestJson.plus.launchwebview.id = '2'
}
packages/uni-cli-shared/src/json/app/manifest/merge.ts
浏览文件 @
a391cdaf
...
...
@@ -3,8 +3,8 @@ import { recursive } from 'merge'
export
function
initRecursiveMerge
(
manifestJson
:
Record
<
string
,
any
>
,
userManifestJson
:
Record
<
string
,
any
>
)
{
recursive
(
)
:
Record
<
string
,
any
>
{
re
turn
re
cursive
(
true
,
manifestJson
,
{
...
...
packages/uni-cli-shared/src/json/app/manifest/nvue.ts
浏览文件 @
a391cdaf
export
function
initNVue
(
manifestJson
:
Record
<
string
,
any
>
,
pagesJson
:
Record
<
string
,
any
>
pagesJson
:
UniApp
.
PagesJson
)
{}
export
function
getNVueCompiler
(
manifestJson
:
Record
<
string
,
any
>
)
{
...
...
packages/uni-cli-shared/src/json/app/manifest/plus.ts
浏览文件 @
a391cdaf
...
...
@@ -11,7 +11,7 @@ const wxPageOrientationMapping = {
export
function
initPlus
(
manifestJson
:
Record
<
string
,
any
>
,
pagesJson
:
Record
<
string
,
any
>
pagesJson
:
UniApp
.
PagesJson
)
{
// 转换为老版本配置
if
(
manifestJson
.
plus
.
modules
)
{
...
...
@@ -39,7 +39,7 @@ export function initPlus(
// app平台优先使用 manifest 配置
manifestJson
.
screenOrientation
=
manifestJson
.
plus
.
screenOrientation
delete
manifestJson
.
plus
.
screenOrientation
}
else
if
(
pagesJson
.
globalStyle
&&
pagesJson
.
globalStyle
.
pageOrientation
)
{
}
else
if
(
pagesJson
.
globalStyle
?
.
pageOrientation
)
{
// 兼容微信小程序
const
pageOrientationValue
=
wxPageOrientationMapping
[
...
...
@@ -69,4 +69,26 @@ export function initPlus(
// 允许内联播放视频
manifestJson
.
plus
.
allowsInlineMediaPlayback
=
true
if
(
!
manifestJson
.
plus
.
distribute
)
{
manifestJson
.
plus
.
distribute
=
{
plugins
:
{},
}
}
if
(
!
manifestJson
.
plus
.
distribute
.
plugins
)
{
manifestJson
.
plus
.
distribute
.
plugins
=
{}
}
// 录音支持 mp3
manifestJson
.
plus
.
distribute
.
plugins
.
audio
=
{
mp3
:
{
description
:
'
Android平台录音支持MP3格式文件
'
,
},
}
// 有效值为 close,none
if
(
!
[
'
close
'
,
'
none
'
].
includes
(
manifestJson
.
plus
.
popGesture
))
{
manifestJson
.
plus
.
popGesture
=
'
close
'
}
}
packages/uni-cli-shared/src/json/app/manifest/safearea.ts
浏览文件 @
a391cdaf
export
function
initSafearea
(
manifestJson
:
Record
<
string
,
any
>
,
pagesJson
:
Record
<
string
,
any
>
pagesJson
:
UniApp
.
PagesJson
)
{
if
(
pagesJson
.
tabBar
&&
pagesJson
.
tabBar
.
list
&&
pagesJson
.
tabBar
.
list
.
length
)
{
if
(
pagesJson
.
tabBar
?.
list
?.
length
)
{
// 安全区配置 仅包含 tabBar 的时候才配置
if
(
!
manifestJson
.
plus
.
safearea
)
{
manifestJson
.
plus
.
safearea
=
{
...
...
packages/uni-cli-shared/src/json/app/manifest/statusbar.ts
浏览文件 @
a391cdaf
export
function
initAppStatusbar
(
manifestJson
:
Record
<
string
,
any
>
,
pagesJson
:
Record
<
string
,
any
>
pagesJson
:
UniApp
.
PagesJson
)
{
const
{
navigationBarTextStyle
=
'
white
'
,
navigationBarBackgroundColor
=
'
#000000
'
,
}
=
pagesJson
.
globalStyle
||
{}
const
{
titleColor
=
'
#000
'
,
backgroundColor
=
'
#000000
'
}
=
pagesJson
.
globalStyle
?.
navigationBar
||
{}
manifestJson
.
plus
.
statusbar
=
{
immersed
:
'
supportedDevice
'
,
style
:
navigationBarTextStyle
===
'
black
'
?
'
dark
'
:
'
light
'
,
background
:
navigationBarB
ackgroundColor
,
style
:
titleColor
===
'
#000
'
?
'
dark
'
:
'
light
'
,
background
:
b
ackgroundColor
,
}
return
manifestJson
}
packages/uni-cli-shared/src/json/app/manifest/tabBar.ts
0 → 100644
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/uni-cli-shared/src/json/app/manifest/uniApp.ts
0 → 100644
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/uni-cli-shared/src/json/app/pages/uniConfig.ts
浏览文件 @
a391cdaf
...
...
@@ -55,5 +55,6 @@ export function normalizeAppUniConfig(
entryPagePath
:
''
,
//TODO
networkTimeout
:
normalizeNetworkTimeout
(
manifestJson
.
networkTimeout
),
}
// TODO 待支持分包
return
JSON
.
stringify
(
config
)
}
packages/uni-cli-shared/src/vite/plugins/copy.ts
0 → 100644
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/uni-cli-shared/src/vite/plugins/index.ts
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/uni-core/src/service/plugin/page.ts
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/uni-shared/dist/uni-shared.cjs.js
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/uni-shared/dist/uni-shared.d.ts
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/uni-shared/dist/uni-shared.es.js
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/uni-shared/src/constants.ts
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/vite-plugin-uni/package.json
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
packages/vite-plugin-uni/src/configResolved/plugins/copy.ts
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
yarn.lock
浏览文件 @
a391cdaf
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录