

English
The manifest.json
file is the configuration file of the application, which is used to specify the name, icon, permissions, etc. of the application. The project created by HBuilderX has this file in the root directory, and the project created by CLI has this file in the src directory.
Attribute | Type | Default | Description | Minimum Version |
---|---|---|---|---|
name | String | application name | ||
appid | String | When creating a new uni-app project, the DCloud cloud distribution. Purpose see details | Application logo | |
description | String | application description | ||
locale | String | auto | Set current default language, refer to locale | |
versionName | String | version name, for example: 1.0.0. See the Tips description below for details | ||
versionCode | Number | 版本号,例如:36 | ||
transformPx | Boolean | true | ||
networkTimeout | Object | Network timeout, see details | ||
debug | Boolean | false | Whether to enable the debug mode, the debugging information will be given in the form of info after it is enabled, and its information includes page registration, page routing, data update, event triggering, etc. | |
uniStatistics | Object | Whether to enable uni statistics, global configuration | 2.2.3+ | |
app-plus | Object | App specific configuration | ||
h5 | Object | H5 specific configuration | ||
quickapp | Object | QuickApp specific configuration, will be supported soon | ||
mp-weixin | Object | WeChat MiniApp specific configuration | ||
mp-alipay | Object | Alipay MiniApp specific configuration | ||
mp-baidu | Object | 百度小程序特有配置 | ||
mp-toutiao | Object | 抖音小程序特有配置 | 1.6.0 | |
mp-lark | Object | Special configuration of Feishu MiniApp | 3.2.12 | |
mp-qq | Object | qq 小程序特有配置 | 2.1.0 | |
mp-kuaishou | Object | 快手小程序特有配置 | 3.2.2 |
Tips
appid
of uni-app is assigned by DCloud and is mainly used for DCloud-related cloud services. Please do not modify it yourself. See detailsappid
of uni-app from the appid
assigned by WeChat MiniApp, iOS and other platforms, and the appid
of third-party SDKs.The timeout period of various network requests, in milliseconds.
Attribute | Type | Required | Default | Description |
---|---|---|---|---|
request | Number | No | 60000 | The timeout of uni.request, in milliseconds. |
connectSocket | Number | No | 60000 | The timeout of uni.connectSocket, in milliseconds. |
uploadFile | Number | No | 60000 | The timeout time of uni.uploadFile, in milliseconds. |
downloadFile | Number | No | 60000 | The timeout time of uni.downloadFile, in milliseconds. |
Since HBuilderX 2.5.10
, the above default timeout time has been changed from 6 seconds to 60 seconds to align with the WeChat MiniApp platform.
uni statistics configuration items
Attribute | Type | Required | Default | Description |
---|---|---|---|---|
enable | Boolean | yes | true | whether to enable uni statistics |
Properties | Type | Description | Minimum Version |
---|---|---|---|
splashscreen | Object | App startup interface information, see details | |
screenOrientation | Array | Gravity sensing, horizontal and vertical screen configuration, possible values: "portrait-primary": positive direction of vertical screen; "portrait-secondary": reverse direction of vertical screen; "landscape-primary": positive direction of horizontal screen;" landscape-secondary": The opposite direction of landscape screen. | |
modules | Object | permission module, see details | |
distribute | Object | App distribution information, see details | |
nvueCompiler | String | Switch nvue compilation mode, optional value, weex : old compilation mode, uni-app : new compilation mode, the default is weex . Compilation mode difference details | 2.0.3+ |
nvueStyleCompiler | String | Switch nvue style compilation mode, optional value, weex : old compilation mode, uni-app : new compilation mode, default is weex . Compilation mode difference details | 3.1.1+ |
renderer | String | You can not load the webview-based runtime framework, reducing the package size and improving the startup speed. Optional value native | App-nvue 2.2.0+ |
nvueLaunchMode | String | Nvue home page launch mode, optional values: normal, fast, default normal (HBuilderX 2.4.4-2.4.9 is fixed to fast) [see details](https://ask.dcloud.net.cn/article /36749) | 2.5.0+ |
nvue | Object | Initial configuration of nvue page layout, see details | 2.0.3+ |
optimization | Object | Subpackage configuration, which can reduce the number of js loaded at startup and improve startup speed | 2.7.12+ |
runmode | String | normal: default mode, liberate: resource release mode | |
uniStatistics | Object | Whether the App enables uni statistics, the configuration method is the same as the global configuration | 2.2.3+ |
webView | Object | When the system webview is lower than the specified version, a prompt will pop up. Or continue to start after downloading the x5 kernel, only supported by Android, Details | 3.5.0+ |
PS: The above table only lists the core parts. There are actually many configurations of the App platform. For the complete content, please refer to Complete manifest.json.
Tips
appid
of the WeChat MiniApp needs to be configured under the mp-weixin
node. Do not configure it under app-plus
. The weixin
node under sdkConfigs
configures the third-party SDK information of the App.Splash (startup cover) is an inevitable existence of App and cannot be cancelled.
Attribute | Type | Default | Description | Minimum Version |
---|---|---|---|---|
alwaysShowBeforeRender | Boolean | true | Whether to wait for the homepage to be rendered before closing the startup interface | 1.6.0 |
autoclose | Boolean | true | Whether to automatically close the startup interface, it only takes effect when alwaysShowBeforeRender is set to false, if you need to [manually close](https://www.html5plus.org/doc/zh_cn/navigator.html#plus.navigator .closeSplashscreen) to start the interface, you need to set alwaysShowBeforeRender and autoclose to false. | |
waiting | Boolean | true | Whether to display the waiting circle or snowflake on the program startup interface |
alwaysShowBeforeRender和autoclose属性组合设置,可配置以下三种关闭启动界面(splash)策略,详见
注意
Module selection is to control the package size of the App, and unnecessary modules can be removed during packaging.
Name | Description |
---|---|
Bluetooth | BLE Bluetooth |
Contacts | System Address Book |
iBeacon | iBeacon |
LivePusher | Live push stream |
Maps | Maps |
Messaging | Short color email message |
OAuth | Login Authorization |
Payment | Payment |
Push | Message Push |
Share | Social Sharing |
Speech | Speech Recognition |
SQLite | SQLite Database |
Statistic | Statistics |
VideoPlayer | Video Player |
注意
Attribute | Type | Description |
---|---|---|
android | Object | Android application configuration, see: Android configuration details |
ios | Object | iOS application configuration, see: iOS configuration details |
sdkConfigs | Object | SDK configuration, only packaged to take effect see details |
orientation | Array | Same as screenOrientation configuration, only packaged and effective, deprecated, recommended to use screenOrientation |
Three-party native SDK configuration. The use of the third-party SDK needs to apply to these SDK providers, and configure parameters here. The configuration can be entered in the HBuilderX visual interface (App SDK configuration), this configuration only takes effect after cloud packaging, local packaging needs to be configured in the native project by itself.
Attribute | Type | Description |
---|---|---|
oauth | Object | Authorized login, after configuration, you can call uni.login to log in. Currently supported authorized login platforms are: [QQ](http://open .qq.com/), WeChat, [Sina Weibo] (http://open.weibo.com/). |
share | Object | Share, after configuration, you can call uni.share to share, currently supports QQ, WeChat, Sina Weibo and other sharing, specific configuration [see]( /api/plugins/share?id=App-side sharing configuration instructions for each platform). |
push | Object | push configuration, usage method see, currently supports: uniPush, [unipush](http: //www.igetui.com/), note that the app only supports one push method, and multiple push configurations are invalid. It is recommended to use uniPush, which supports multi-vendor push. |
payment | Object | Three-party payment configuration, after configuration, you can call uni.payment to make payment, currently supports WeChat payment, Alipay payment, Apple in-app purchase, specific configuration [see ](/api/plugins/payment?id=uni-app-app-platform payment process). |
statics | Object | Statistics configuration, currently only pay for Youmeng statistics, see details, in uni-app only use [plus.statistic](http://www.html5plus.org /doc/zh_cn/statistic.html) to call. |
speech | Object | Speech recognition configuration, support Xunfei voice, Baidu voice, see for details, only use [plus.speech](http://www.html5plus in uni-app .org/doc/zh_cn/speech.html) to call. |
maps | Object | Native map configuration, currently only supports Automap, the application method can refer to: Map plugin configuration. |
It can reduce the number of js loaded at startup and improve startup speed.
Starting from uni-app 2.7.12+, the App-vue platform is also compatible with the subpackage configuration of MiniApp, but it is not enabled by default.
Configure the following nodes in the manifest to start subcontracting on the App side.
Attribute | Type | Description |
---|---|---|
subPackages | Boolean | 是否开启分包优化,目前仅 uni-app vue2 下生效 |
{
"app-plus": {
"optimization": {
"subPackages": true
},
"runmode" : "liberate" // 开启分包优化后,必须配置资源释放模式
}
}
After starting the subpackage in the manifest, you need to configure specific subpackage rules in pages.json, which is the same as the configuration of the MiniApp. For details, see: https://uniapp.dcloud.io/collocation/pages?id=subpackages
That is, once subcontracting is configured in pages.json, the MiniApp must take effect, and whether the app takes effect depends on whether it is enabled in the manifest.
注意:
nvue
page layout initial setup
Attribute | Type | Description |
---|---|---|
flex-direction | String | Arrangement direction of flex member items, supporting items, row: from left to right; row-reverse: from right to left; column: from top to bottom; column-reverse: opposite to column, default value column. |
uni-app 3.5.0+
When the App code uses a grammar that is not supported by a lower version of webview (such as using vue3), you can configure this property in the manifest to specify the minimum running webview version.
当系统webview版本不符合需求时,uni-app引擎会自动弹框。同时开发者可以指定使用 x5引擎webview 来替代系统webview,以保障浏览器兼容性。详见x5文档
When your application strongly relies on x5, for example, when you need to keep the font of the vue page consistent with native interfaces such as tabbar, you can also configure this property in the manifest.
Attribute | Type | Description |
---|---|---|
minUserAgentVersion | String | The minimum webview version, for example: 64.0.3282.116. (When the minimum version requirement is lower than the minimum version, a WebView version is too low pop-up box will be displayed, click OK to exit the application.) |
x5 | Object | This attribute needs to check the Android X5 Webview module in the manifest module configuration, see the description below for details |
x5 attribute description
Attribute | Type | Default | Description |
---|---|---|---|
timeOut | Number | 3000 | timeout time |
showTipsWithoutWifi | Boolean | false | Whether to display a pop-up window for the user to confirm downloading the x5 kernel in a non-WiFi network environment. (If it is true, when downloading the x5 module on a non-WiFi network, a user confirmation pop-up box will be displayed, the content is Currently in a non-WiFi network, is it allowed to download the x5 module? , when false, no pop-up box will be displayed.) |
allowDownloadWithoutWiFi | Boolean | false | Whether to allow the user to download the x5 kernel when not on a WiFi network. (If it is true, the pop-up window for user confirmation will not be displayed. When it is false, if showTipsWithoutWifi is true, the user confirmation pop-up box will be displayed; when showTipsWithoutWifi is false, the x5 module will not be downloaded.) |
webview example
{
"app-plus" : {
"webView": {
"minUserAgentVersion": "64.0.3282.116",
"x5": {
"timeOut": 3000,
"showTipsWithoutWifi": true,
"allowDownloadWithoutWiFi": false
}
}
}
}
Tip: The vue3 vue page requires the minimum version of the Android system webview to be 64.0.3282.116
Attribute | Type | Description | |
---|---|---|---|
title | String | 页面标题,默认使用 manifest.json 的 name | |
template | String | index.html 模板路径,相对于应用根目录,可定制生成的 html 代码。参考:自定义模板, Vue2 支持,Vue3 暂不支持 | |
router | Object | Reference: router | |
async | Object | Reference: async | |
devServer | Object | 开发环境 server 配置,参考:devServer | |
publicPath | String | 引用资源的地址前缀,仅 Vue2 发布时生效。参考:publicPath | |
sdkConfigs | String | SDK configuration, such as map... Reference: sdkConfigs | |
optimization | Object | Package optimization configuration (supported by HBuilderX 2.1.5 and above), refer to optimization | |
uniStatistics | Object | Whether to enable uni statistics in H5, the configuration method is the same as the global configuration |
目前 Vue2 支持, Vue3 暂不支持
Scenarios that require the use of custom templates usually have the following situations:
使用自定义模板时,1. 工程根目录下新建一个html文件;2. 复制下面的基本模板内容,到这个html文件,在此基础上修改meta和引入js;3. 在 manifest.json->h5->template
节点中关联这个html文件的路径。
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<!-- Open Graph data -->
<!-- <meta property="og:title" content="Title Here" /> -->
<!-- <meta property="og:url" content="http://www.example.com/" /> -->
<!-- <meta property="og:image" content="http://example.com/image.jpg" /> -->
<!-- <meta property="og:description" content="Description Here" /> -->
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
</head>
<body>
<noscript>
<strong>Please enable JavaScript to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
There is a template.h5.html
file in the hello uni-app example, which is used for this purpose.
Additional note about SEO
The H5 platform is a SPA single-page application. Common SEO information, that is, adding meta fields can only be configured on the homepage in the custom template html.
But the era of SEO is changing, and now a more effective way is to use uni-app to release a version of Baidu MiniApp at the same time, which has a higher search weight. The H5 version of DCloud's ask community is also made by uni-app. At the same time, a Baidu MiniApp is released, which has a higher weight and a lot of searches from Baidu every day. It's a good case to speak for itself.
Attribute | Type | Default | Description |
---|---|---|---|
mode | String | hash | routing jump mode, support hash, history |
base | String | / | Application base path, for example, if the entire single-page application service is under /app/, then the base should be set to "/app/", and it is supported to be set to a relative path "./" |
Notice:
history
mode is not supported by some browsers, and the built-in browser of iOS WeChat cannot observe URL changes, and the default sharing (does not use WeChat JSSDK case) is the entry page link.history
模式发行需要后台配置支持,详见:history 模式的后端配置base
参数设置为空或者 /
,应用运行在 /
根目录下。./
时,应用运行在相对路径下,可配合 nginx
等工具运行在任意路径中。Attribute | Type | Default | Description |
---|---|---|---|
loading | String | AsyncLoading | the component used when page js is loaded (need to be registered as a global component) |
error | String | AsyncError | The component used when the page js fails to load (need to be registered as a global component) |
delay | Number | 200 | Display the delay time of the loading loading component (if the page js is loaded within the delay time, the loading component will not be displayed) |
timeout | Number | 60000 | page js loading timeout time (the component corresponding to error will be displayed after timeout) |
Attribute | Type | Default | Description |
---|---|---|---|
https | Boolean | false | Enable https protocol |
port | Number | Vue2 8080; Vue3 3000 | Front-end development service port |
disableHostCheck | Boolean | false | Disable Host Check |
Tips:uni-app
中 manifest.json->h5->devServer
,vue2
实际上对应 webpack
的 devServer,vue3
实际上对应 vite
的 server,鉴于 manifest 为 json 文件,故 webpack.config.js->devServer
及 vite.config.js->server
配置项下的简单类型属性均可在manifest.json->h5->devServer
节点下配置,funciton 等复杂类型暂不支持。
Configure publicPath as the prefix of the cdn resource address, so that the compiled html file, the referenced js, and css paths will automatically become the address on the cdn.
Note: If you want to take effect on the image, the image address of the image component needs to use a relative path
example
Take hello-uniapp as an example when releasing H5
Result in index.html when publishing when no publicPath is configured:
<script src=/h5/static/js/chunk-vendors.803ce52d.js></script>
<script src=/h5/static/js/index.34e8497d.js>
After configuring publicPath to https://www.cdn.com/h5/
(invalid address is just used as an example), the result in index.html when publishing:
<script src=https://www.cdn.com/h5/static/js/chunk-vendors.803ce52d.js></script>
<script src=https://www.cdn.com/h5/static/js/index.34e8497d.js>
注意
Three-party SDK configuration. The use of the third-party SDK needs to apply to these SDK providers, and configure parameters here. The configuration can be entered in the HBuilderX visual interface (H5 configuration).
Attribute | Type | Description |
---|---|---|
maps | Object | Map or location-related SDK |
Map service provider SDK configuration, this item needs to be configured when using maps and locations (IP positioning and coordinate conversion).
example
{
"h5": {
"sdkConfigs": {
// To use map or location-related functions, one must be filled in
"maps": {
"qqmap": {
// Tencent map key https://lbs.qq.com/dev/console/key/manage
"key": ""
},
"google": {
// Google Maps key (HBuilderX 3.2.10+) https://developers.google.com/maps/documentation/javascript/get-api-key
"key": ""
},
"amap": {
// Amap key (HBuilderX 3.6.0+) https://console.amap.com/dev/key/app
"key": "",
// Amap security key (HBuilderX 3.6.0+) https://console.amap.com/dev/key/app
"securityJsCode": "",
// Amap security key proxy server address (HBuilderX 3.6.0+) https://lbs.amap.com/api/jsapi-v2/guide/abc/prepare
"serviceHost": "",
},
"bmap": {
// 百度地图秘钥(HBuilderX 3.99+)http://lbsyun.baidu.com/apiconsole/key#/home
"key": ""
}
}
}
}
}
Attribute | Type | Default | Description |
---|---|---|---|
prefetch | Boolean | false | resource prefetch |
preload | Boolean | false | resource preload |
treeShaking | Object | tree-shaking optimization, according to project requirements, dynamically package the components and API required by the framework, keep the framework code as simple as possible, refer to treeShaking |
Attribute | Type | Default | Description |
---|---|---|---|
enable | Boolean | false | whether to enable tree shaking optimization |
示例:
{
"h5": {
"optimization": {
"treeShaking": {
"enable": true
}
}
}
}
Tips: For treeshaking optimization (treeShaking) principle and optimization results, refer to: https://ask.dcloud.net.cn/article/36279
Attribute | Type | Description |
---|---|---|
appid | String | AppID of the WeChat MiniApp, log in https://mp.weixin.qq.com to apply |
setting | Object | WeChat MiniApp project settings, refer to setting |
functionalPages | Boolean | Whether to enable the plug-in function page of the WeChat MiniApp, it is disabled by default |
requiredBackgroundModes | Array | WeChat MiniApp needs to be used in the background, see |
plugins | Object | The plugin used, see details |
resizable | Boolean | 在iPad上小程序是否支持屏幕旋转,默认关闭 |
navigateToMiniProgramAppIdList | Array | 需要跳转的小程序列表,详见 |
permission | Object | WeChat MiniApp interface permission related settings, such as applying for location permission must be filled here see details |
workers | String | The directory where the Worker code is placed. See details |
optimization | Object | Optimization configuration for WeChat MiniApp |
cloudfunctionRoot | String | Configure cloud development directory, refer to setting |
uniStatistics | Object | Whether to enable uni statistics in the WeChat MiniApp, the configuration method is the same as the global configuration |
scopedSlotsCompiler | String | Vue2 作用域插槽编译模式,uni-app 3.1.19+ 开始支持,可选:legacy、auto、augmented,默认:auto |
mergeVirtualHostAttributes | Boolean | 合并组件虚拟节点外层属性(目前仅支持 style、class 属性),uni-app 3.5.1+ 开始支持 |
slotMultipleInstance | Boolean | 模拟单个作用域插槽渲染为多个实例,此配置仅限 Vue2 环境 3.7.12+,Vue3 环境已默认支持 |
embeddedAppIdList | Array | 要半屏跳转的小程序appid。详见 |
requiredPrivateInfos | Array | 地理位置相关接口。详见 |
lazyCodeLoading | String | support only requiredComponents,Represents opening the MiniApp On-demand injectionfeature,Details |
Compile to the project settings under the WeChat MiniApp platform.
Attribute | Type | Description |
---|---|---|
urlCheck | Boolean | Whether to check secure domain name and TLS version |
es6 | Boolean | ES6 to ES5 |
postcss | Boolean | Whether the style is automatically completed when uploading the code |
minified | Boolean | Whether to automatically compress code when uploading |
bigPackageSizeSupport | Boolean | Whether to adjust the upper limit of the package size to 4M when previewing and real-device debugging, the default is true (HBuilderX 3.5.5+). |
注意: 使用微信小程序手势组件会强制开启 ES6 转 ES5
Optimized configuration for WeChat MiniApp
Attribute | Type | Description |
---|---|---|
subPackages | Boolean | Whether to enable subpackage optimization |
If you need to use the cloud development of WeChat MiniApp, you need to configure the cloud development directory in mp-weixin
"mp-weixin":{
// ...
"cloudfunctionRoot": "cloudfunctions/", // 配置云开发目录
// ...
}
After configuring the directory, you need to create a new vue.config.js
in the project root directory to configure the corresponding file compilation rules
{
plugins: [
new CopyWebpackPlugin([
{
from: path.join(__dirname, '../cloudfunctions'),
to: path.join(__dirname, 'unpackage', 'dist', process.env.NODE_ENV === 'production' ? 'build' : 'dev', process.env.UNI_PLATFORM, 'cloudfunctions'),
},
]),
],
}
Property | Type | Description |
---|---|---|
plugins | Object | Plugins used, see details |
component2 | Boolean | Whether to enable component2 compilation, the default is true, View Details |
enableAppxNg | Boolean | Whether to enable the enableAppxNg MiniApp base library 2.x build, the default is true, View Details, HBuilderX 3.2.10+ |
axmlStrictCheck | Boolean | Whether to enable axml strict syntax checking, default is false |
enableParallelLoader | Boolean | Whether to enable multi-process compilation, the default is false |
enableDistFileMinify | Boolean | Whether to compress the compiled product (only valid in real device preview/real device debugging), the default is false |
uniStatistics | Object | Whether the Alipay MiniApp enables uni statistics, the configuration method is the same as the global configuration |
scopedSlotsCompiler | String | Vue2 作用域插槽编译模式,uni-app 3.1.19+ 开始支持,可选:legacy、auto、augmented,默认:auto |
mergeVirtualHostAttributes | Boolean | 合并组件虚拟节点外层属性(目前仅支持 style、class 属性),uni-app 3.5.1+ 开始支持 |
slotMultipleInstance | Boolean | 模拟单个作用域插槽渲染为多个实例,此配置仅限 Vue2 环境 3.7.12+,Vue3 环境已默认支持 |
lazyCodeLoading | String | 是否开启代码按需执行。 |
styleIsolation | String | 组件样式隔离方式,默认值为 apply-shared ,具体配置 详见。 uni-app 3.99+ 开始支持 |
Attribute | Type | Description |
---|---|---|
appid | String | AppID of Baidu MiniApp, log in https://smartprogram.baidu.com/docs/introduction/enter_application/ to apply |
requiredBackgroundModes | Array | MiniApp need the ability to be used in the background, and currently support background audio playback, "requiredBackgroundModes": ["audio"], see details |
prefetches | Array | A list of all pre-requested urls, see details |
optimization | Object | optimization configuration for Baidu MiniApp |
uniStatistics | Object | Whether to enable uni statistics in the Baidu MiniApp, the configuration method is the same as the global configuration |
scopedSlotsCompiler | String | Vue2 作用域插槽编译模式,uni-app 3.1.19+ 开始支持,可选:legacy、auto、augmented,默认:auto |
slotMultipleInstance | Boolean | 模拟单个作用域插槽渲染为多个实例,此配置仅限 Vue2 环境 3.7.12+,Vue3 环境已默认支持 |
dynamicLib | Object | Introduce a dynamic library, please refer to Use a dynamic library |
Optimized configuration for Baidu MiniApp
Attribute | Type | Description |
---|---|---|
subPackages | Boolean | Whether to enable subpackage optimization |
Attribute | Type | Description |
---|---|---|
appid | String | 抖音小程序的 AppID,登录 https://microapp.bytedance.com/ 申请 |
setting | Object | 抖音小程序项目设置,参考抖音小程序项目设置 |
navigateToMiniProgramAppIdList | Array | 需要跳转的小程序列表,详见 |
uniStatistics | Object | 抖音小程序是否开启 uni 统计,配置方法同全局配置 |
scopedSlotsCompiler | String | Vue2 作用域插槽编译模式,uni-app 3.1.19+ 开始支持,可选:legacy、auto、augmented,默认:auto |
slotMultipleInstance | Boolean | 模拟单个作用域插槽渲染为多个实例,此配置仅限 Vue2 环境 3.7.12+,Vue3 环境已默认支持 |
Attribute | Type | Description |
---|---|---|
urlCheck | Boolean | Whether to check secure domain name and TLS version |
es6 | Boolean | ES6 to ES5 |
postcss | Boolean | Whether the style is automatically completed when uploading the code |
minified | Boolean | Whether to automatically compress code when uploading |
Attribute | Type | Description |
---|---|---|
appid | String | AppID of the Feishu MiniApp, log in to https://open.feishu.cn to apply |
setting | Object | Feishu MiniApp project settings, refer to Feishu MiniApp project settings |
uniStatistics | Object | Whether the Feishu MiniApp enables uni statistics, the configuration method is the same as the global configuration |
scopedSlotsCompiler | String | Vue2 作用域插槽编译模式,uni-app 3.1.19+ 开始支持,可选:legacy、auto、augmented,默认:auto |
slotMultipleInstance | Boolean | 模拟单个作用域插槽渲染为多个实例,此配置仅限 Vue2 环境 3.7.12+,Vue3 环境已默认支持 |
Attribute | Type | Description |
---|---|---|
urlCheck | Boolean | Whether to check secure domain name and TLS version |
es6 | Boolean | ES6 to ES5 |
postcss | Boolean | Whether the style is automatically completed when uploading the code |
minified | Boolean | Whether to automatically compress code when uploading |
Property | Type | Description |
---|---|---|
appid | String | The AppID of the qq MiniApp, log in https://q.qq.com to apply |
requiredBackgroundModes | Array | The ability of the MiniApp to be used in the background, currently supports background audio playback, "requiredBackgroundModes": ["audio"], see details |
navigateToMiniProgramAppIdList | Array | A list of MiniApp that need to be redirected, see details |
permission | Object | MiniApp interface permission-related settings, such as applying for location permissions must be filled here see details |
workers | String | The directory where the Worker code is placed. See details |
groupIdList | String Array | The list of group IDs that need to open the group data card, see the open-type of the button for details |
optimization | Object | optimization configuration of QQ MiniApp |
uniStatistics | Object | Whether to enable uni statistics in the QQ MiniApp, the configuration method is the same as the global configuration |
scopedSlotsCompiler | String | Vue2 作用域插槽编译模式,uni-app 3.1.19+ 开始支持,可选:legacy、auto、augmented,默认:auto |
slotMultipleInstance | Boolean | 模拟单个作用域插槽渲染为多个实例,此配置仅限 Vue2 环境 3.7.12+,Vue3 环境已默认支持 |
Optimized configuration for QQ MiniApp
Attribute | Type | Description |
---|---|---|
subPackages | Boolean | Whether to enable subpackage optimization |
Attribute | Type | Description |
---|---|---|
appid | String | AppID of the Kuaishou MiniApp, log in https://mp.kuaishou.com to apply |
optimization | Object | optimization configuration of Kuaishou MiniApp |
uniStatistics | Object | Whether the Kuaishou MiniApp enables uni statistics, the configuration method is the same as the global configuration |
scopedSlotsCompiler | String | Vue2 作用域插槽编译模式,uni-app 3.1.19+ 开始支持,可选:legacy、auto、augmented,默认:augmented |
slotMultipleInstance | Boolean | 模拟单个作用域插槽渲染为多个实例,此配置仅限 Vue2 环境 3.7.12+,Vue3 环境已默认支持 |
Optimized configuration for Kuaishou MiniApp
Attribute | Type | Description |
---|---|---|
subPackages | Boolean | Whether to enable subpackage optimization |
HBuilderX 3.6.16+ supports creating a configuration file in the project root directory (cli project is the src directory) to customize the configuration of the MiniApp project. The platform corresponding file name is as follows:
MiniApp Platform | File Name |
---|---|
project.config.json | |
Baidu | project.swan.json |
支付宝 | mini.project.json |
抖音 | project.tt.json |
Feishu | project.lark.json |
Kuaishou | project.ks.json |
Jingdong | project.config.json |
"optimization":{"subPackages":true}
under the configuration of the corresponding platform to enable subpackage optimizationmp-weixin
, mp-qq
, mp-baidu
, mp-toutiao
, mp-kuaishou
Example of static files in subpackage
"subPackages": [{
"root": "pages/sub",
"pages": [{
"path": "index/index"
}]
}]
Taking the above subpackage as an example, the static files placed in the directory corresponding to the root of each subpackage will be packaged into this subpackage.
Property | Type | Description |
---|---|---|
icon | String | Application icon, recommended by Huawei 192x192 |
package | String | application package name |
minPlatformVersion | Number | Minimum platform support (Huawei minimum 1070, vivo 1063) |
versionName | String | version name |
versionCode | Number | Version number |
manifest.json配置
{
"quickapp-webview": {// 快应用通用配置
"icon": "/static/logo.png",
"package": "com.example.demo",
"versionName": "1.0.0",
"versionCode": 100
},
"quickapp-webview-union": {// 快应用联盟,目前仅支持 vivo、oppo
"minPlatformVersion": 1063 //最小平台支持
},
"quickapp-webview-huawei": {// 快应用华为
"minPlatformVersion": 1070 //最小平台支持
}
}
Q: How to modify the pop-up prompts when the iOS app calls the camera and other permissions? A: In the manifest.json visual interface - App module permission configuration - iOS privacy information access permission description