@@ -91,19 +91,19 @@ export default {
9191
9292#### 各端支持程度如下
9393
94- | 属性 | 微信 | 百度 | 字节跳动 | 支付宝 | H5 | RN |
95- | ---------------------------- | ----------------------------------- | -------------------------- | -------- | ------ | --- | --- |
96- | navigationBarBackgroundColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
97- | navigationBarTextStyle | ✔️ | ✔️ | ✔️ | ✘ | ✔️ | ✔️ |
98- | navigationBarTitleText | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
99- | navigationStyle | ✔️(微信客户端 6.6.0) | ✔️(百度 App 版本 11.1.0) | ✔️ | ✘ | ✘ | ✘ |
100- | backgroundColor | ✔️ | ✔️ | ✔️ | ✘ | ✘ | ✘ |
101- | backgroundTextStyle | ✔️ | ✔️ | ✔️ | ✘ | ✘ | ✘ |
102- | backgroundColorTop | ✔️(微信客户端 6.5.16) | ✘ | ✔️ | ✘ | ✘ | ✘ |
103- | backgroundColorBottom | ✔️(微信客户端 6.5.16) | ✘ | ✔️ | ✘ | ✘ | ✘ |
104- | enablePullDownRefresh | ✔️ | ✔️ | ✔️ | ✔️ | ✘ | ✘ |
105- | onReachBottomDistance | ✔️ | ✔️ | ✔️ | ✘ | ✘ | ✘ |
106- | pageOrientation | ✔️ 2.4.0 (auto) / 2.5.0 (landscape) | ✘ | ✘ | ✘ | ✘ | ✘ |
94+ | 属性 | 微信 | 百度 | 字节跳动 | 支付宝 | H5 | RN | ASCF 元服务 |
95+ | ---------------------------- | ----------------------------------- | -------------------------- | -------- | ------ | --- | --- | ----------- |
96+ | navigationBarBackgroundColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
97+ | navigationBarTextStyle | ✔️ | ✔️ | ✔️ | ✘ | ✔️ | ✔️ | ✔️ |
98+ | navigationBarTitleText | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
99+ | navigationStyle | ✔️(微信客户端 6.6.0) | ✔️(百度 App 版本 11.1.0) | ✔️ | ✘ | ✘ | ✘ | ✔️ |
100+ | backgroundColor | ✔️ | ✔️ | ✔️ | ✘ | ✘ | ✘ | ✔️ |
101+ | backgroundTextStyle | ✔️ | ✔️ | ✔️ | ✘ | ✘ | ✘ | ✘ |
102+ | backgroundColorTop | ✔️(微信客户端 6.5.16) | ✘ | ✔️ | ✘ | ✘ | ✘ | ✘ |
103+ | backgroundColorBottom | ✔️(微信客户端 6.5.16) | ✘ | ✔️ | ✘ | ✘ | ✘ | ✘ |
104+ | enablePullDownRefresh | ✔️ | ✔️ | ✔️ | ✔️ | ✘ | ✘ | ✔️ |
105+ | onReachBottomDistance | ✔️ | ✔️ | ✔️ | ✘ | ✘ | ✘ | ✘ |
106+ | pageOrientation | ✔️ 2.4.0 (auto) / 2.5.0 (landscape) | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ |
107107
108108#### 代码示例
109109
@@ -147,15 +147,15 @@ export default {
147147
148148#### 各端支持程度如下
149149
150- | 属性 | 微信 | 百度 | 字节跳动 | 支付宝 | H5 | RN |
151- | --------------- | ----------------------- | ---- | -------- | ------ | --- | --- |
152- | color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
153- | selectedColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
154- | backgroundColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
155- | borderStyle | ✔️ | ✔️ | ✔️ | ✘ | ✔️ | ✔️ |
156- | list | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
157- | position | ✔️ | ✘ | ✔️ | ✘ | ✘ | ✘ |
158- | custom | ✔️(基础库 2.5.0 以上) | ✘ | ✘ | ✘ | ✘ | ✘ |
150+ | 属性 | 微信 | 百度 | 字节跳动 | 支付宝 | H5 | RN | ASCF 元服务 |
151+ | --------------- | ----------------------- | ---- | -------- | ------ | --- | --- | ----------- |
152+ | color | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
153+ | selectedColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
154+ | backgroundColor | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
155+ | borderStyle | ✔️ | ✔️ | ✔️ | ✘ | ✔️ | ✔️ | ✔️ |
156+ | list | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
157+ | position | ✔️ | ✘ | ✔️ | ✘ | ✘ | ✘ | ✘ |
158+ | custom | ✔️(基础库 2.5.0 以上) | ✘ | ✘ | ✘ | ✘ | ✘ | ✔️ |
159159
160160### subPackages
161161
@@ -199,7 +199,7 @@ export default {
199199
200200### permission
201201
202- 支持情况: <img src={require('@site/static /img/platform/weapp.png').default} className="icon_platform" width="25px"/> <img src={require('@site/static /img/platform/swan.png').default} className="icon_platform" width="25px"/> <img src={require('@site/static /img/platform/tt.png').default} className="icon_platform" width="25px"/> <img src={require('@site/static /img/platform/qq.png').default} className="icon_platform" width="25px"/>
202+ 支持情况: <img src={require('@site/static /img/platform/weapp.png').default} className="icon_platform" width="25px"/> <img src={require('@site/static /img/platform/swan.png').default} className="icon_platform" width="25px"/> <img src={require('@site/static /img/platform/tt.png').default} className="icon_platform" width="25px"/> <img src={require('@site/static /img/platform/qq.png').default} className="icon_platform" width="25px"/> <img src={require(' @ site/static /img/platform/ascf.png').default} className="icon_platform" width="25px"/>
203203
204204小程序[ 接口权限] ( https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html ) 相关设置。字段类型为 ` Object ` ,结构为:
205205
@@ -230,7 +230,7 @@ export default {
230230
231231### requiredBackgroundModes
232232
233- 支持情况:<img src={require('@site/static /img/platform/weapp.png').default} className="icon_platform" width="25px"/> <img src={require('@site/static /img/platform/swan.png').default} className="icon_platform" width="25px"/> <img src={require('@site/static /img/platform/qq.png').default} className="icon_platform" width="25px"/>
233+ 支持情况:<img src={require('@site/static /img/platform/weapp.png').default} className="icon_platform" width="25px"/> <img src={require('@site/static /img/platform/swan.png').default} className="icon_platform" width="25px"/> <img src={require('@site/static /img/platform/qq.png').default} className="icon_platform" width="25px"/> <img src={require(' @ site/static /img/platform/ascf.png').default} className="icon_platform" width="25px"/>
234234
235235申明需要后台运行的能力,类型为数组。目前支持以下项目:
236236
@@ -260,7 +260,7 @@ export default {
260260
261261### entryPagePath
262262
263- 支持情况:<img src={require('@site/static /img/platform/weapp.png').default} className="icon_platform" width="25px"/> <img src={require('@site/static /img/platform/tt.png').default} className="icon_platform" width="25px"/> <img src={require('@site/static /img/platform/h5.png').default} className="icon_platform" width="25px"/>
263+ 支持情况:<img src={require('@site/static /img/platform/weapp.png').default} className="icon_platform" width="25px"/> <img src={require('@site/static /img/platform/tt.png').default} className="icon_platform" width="25px"/> <img src={require('@site/static /img/platform/h5.png').default} className="icon_platform" width="25px"/> <img src={require(' @ site/static /img/platform/ascf.png').default} className="icon_platform" width="25px"/>
264264
265265指定小程序的默认启动路径(首页),常见情景是从微信聊天列表页下拉启动、小程序列表启动等。如果不填,将默认为 ` pages ` 列表的第一项。不支持带页面路径参数。
266266
@@ -661,31 +661,40 @@ export default {
661661
662662## ASCF 元服务支持的属性
663663
664- ### ASCF支持的全局参数
664+ 只在 ASCF 元服务中支持的属性。<img src={require(' @ site/static /img/platform/ascf.png').default} className="icon_platform" width="25px"/>
665665
666- 这些配置需在项目的入口配置文件(如 app.config.js)中声明,以实现对ASCF元服务的适配。
666+ | 属性 | 类型 | 描述 |
667+ | :------------------------------------ | :----- | :------------------------- |
668+ | [ usingComponents] ( #usingcomponents-1 ) | Object | 全局自定义组件配置 |
669+ | [ resolveAlias] ( #resolveAlias ) | Object | 微信消息用小程序打开 |
670+ | [ lazyCodeLoading] ( #lazycodeloading-1 ) | String | 配置自定义组件代码按需注入 |
667671
668- | 属性 | 类型 | 必填 | 默认值 | 说明 |
669- | :------------ | :------ | :--- | :----- | :--------------------------------- |
670- | ascfAppId | String | 是 | 无 | ASCF元服务的唯一应用标识,需在ASCF开发者平台申请后填写。 |
671- | serviceType | String | 是 | 无 | 元服务类型,可选值:miniprogram(小程序式元服务)、webapp(轻应用式元服务)。 |
672- | enableAuth | Boolean | 否 | false | 是否开启ASCF的全局用户鉴权功能,需配合ASCF的API使用。 |
673- | apiBaseUrl | String | 否 | 无 | ASCF后端API的统一请求地址,用于元服务与服务器的通信。 |
672+ ### usingComponents
673+
674+ 在此处声明的自定义组件视为全局自定义组件,在 ASCF 元服务内的页面或自定义组件中可以直接使用而无需再声明。
675+
676+ ### lazyCodeLoading
677+
678+ > 配置自定义组件代码按需注入,目前仅支持"requiredComponents"。起始版本:1.0.13。依赖关系:ASCF Toolkit 版本 ≥1.0.6
679+
680+ 在元服务启动的过程中,代码注入是一个主要的耗时环节。注入代码量的大小与内存占用与注入耗时正相关。
681+
682+ 利用“按需注入”和“用时注入”的特性,可以优化代码注入环节的耗时和内存占用。
683+
684+ 更多详见[ 按需注入和用时注入] ( https://developer.huawei.com/consumer/cn/doc/atomic-ascf/on-demand-render-time-injection ) 。
674685
675686#### 代码示例
676687
677688``` js title="app.config.js"
678689export default {
679- pages: [' pages/index/index' ],
680- window : {
681- navigationBarTitleText: ' Taro Demo' ,
682- },
690+ lazyCodeLoading: ' requiredComponents' ,
691+ }
692+ ```
683693
684- ascf: {
685- ascfAppId: ' ASCF_123456' ,
686- serviceType: ' miniprogram' ,
687- enableAuth: true ,
688- apiBaseUrl: ' https://api.ascf.com' ,
689- },
690- };
691- ```
694+ ### resolveAlias
695+
696+ resolveAlias 配置项可用于自定义模块路径的映射规则。
697+
698+ 配置完成后,它会对 require 中的模块路径按照所设定的映射规则进行匹配,进而转换为对应的配置路径。
699+
700+ 更多详见[ resolveAlias] ( https://developer.huawei.com/consumer/cn/doc/atomic-ascf/appjson-global-config#section13041254111110 ) 。
0 commit comments