@@ -14,24 +14,24 @@ mpx-fetch提供了一个实例**xfetch** ,该实例包含以下api
1414
1515 config 可指定以下属性:
1616 - ** url**
17-
17+
1818 `string`
19-
19+
2020 设置请求url
2121 - ** method**
2222
2323 ` string `
24-
24+
2525 设置请求方式,默认为GET
2626 - ** data**
2727
2828 ` object `
29-
29+
3030 设置请求参数
3131 - ** params**
3232
3333 ` object `
34-
34+
3535 设置请求参数,参数会以 Query String 的形式进行传递
3636 - ** header**
3737
@@ -40,14 +40,14 @@ mpx-fetch提供了一个实例**xfetch** ,该实例包含以下api
4040 设置请求的 header,header 中不能设置 Referer。
4141 ` content-type ` 默认为 ` application/json `
4242 - ** timeout**
43-
43+
4444 ` number `
45-
45+
4646 单位为毫秒。若不传,默认读取app.json文件中__ networkTimeout属性。 对于超时的处理可在 catch 方法中进行
4747 - ** emulateJSON**
4848
4949 ` boolean `
50-
50+
5151 设置为 true 时,等价于 header = {'content-type': 'application/x-www-form-urlencoded'}
5252 - ** usePre**
5353
@@ -483,7 +483,7 @@ useFetch().fetch({
483483| closeBLEConnection | :white_check_mark : | :white_check_mark : | :x : | :x : |
484484| createBLEConnection | :white_check_mark : | :white_check_mark : | :x : | :x : |
485485| onBLEConnectionStateChange | :white_check_mark : | :white_check_mark : | :x : | :x : |
486- | createIntersectionObserver | :white_check_mark : | :white_check_mark : | :x : | :x : |
486+ | createIntersectionObserver | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : |
487487| createSelectorQuery | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : |
488488| getExtConfig | :white_check_mark : | :white_check_mark : | :x : | :x : |
489489| getExtConfigSync | :white_check_mark : | :white_check_mark : | :x : | :x : |
@@ -565,6 +565,7 @@ useFetch().fetch({
565565| onNetworkStatusChange | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : |
566566| offNetworkStatusChange | :white_check_mark : | :white_check_mark : | :white_check_mark : | :white_check_mark : |
567567| createVideoContext | :white_check_mark : | :white_check_mark : | :white_check_mark : | :x : |
568+ | onLazyLoadError | :white_check_mark : | :white_check_mark : | :x : | :white_check_mark : |
568569## webview-bridge
569570Mpx 支持小程序跨平台后,多个平台的小程序里都提供了 webview 组件,webview 打开的 H5 页面可以通过小程序提供的 API 来与小程序通信以及调用一些小程序的能力,但是各家小程序对于 webview 提供的API是不一样的。
570571
@@ -694,20 +695,20 @@ Mpx框架项目包体积可以进行分组、分包、页面、冗余Npm包等
694695 ` Array<object> `
695696
696697 配置体积计算分组,以输入分组为维度对体积进行分析,当没有该配置时结果中将不会包含分组体积信息
697-
698+
698699 - name
699-
700+
700701 ` string `
701702
702703 分组名称
703704
704705 - threshold
705-
706+
706707 ` string | object `
707708
708709 分组相关体积阈值,若不配置则该分组不校验体积阈值,同时也支持对分组中占各分包体积阈值
709710
710-
711+
711712 ``` html
712713 // 分组体积限额 500KB
713714 threshold: '500KB'
@@ -719,32 +720,32 @@ Mpx框架项目包体积可以进行分组、分包、页面、冗余Npm包等
719720 }
720721 }
721722 ```
722-
723+
723724 - entryRules
724-
725+
725726 `object`
726-
727+
727728 配置分组 entry 匹配规则,小程序中所有的页面和组件都可被视为 entry
728-
729+
729730 - include: 包含符合条件的入口文件,默认为空数组,规则数组中支持函数、正则、字符串
730731 - exclude: 剔除符合条件的入口文件,默认为空数组,规则数组中支持函数、正则、字符串
731-
732-
732+
733+
733734 ```html
734735 include: [/@someGroup\/some-npm-package/],
735736 exclude: [/@someGroup\/some-two-pack/]
736737 ```
737-
738+
738739 - noEntryRules
739740
740741 `object`
741742
742743 配置计算分组中纯 js 入口引入的体积(不包含组件和页面)
743-
744+
744745 - include: 包含符合条件的 js 文件,默认为空数组,规则数组中支持函数、正则、字符串
745746 - exclude: 剔除符合条件的 js 文件,默认为空数组,规则数组中支持函数、正则、字符串
746-
747-
747+
748+
748749 ```html
749750 include: [/@someGroup\/some-npm-package/],
750751 exclude: [/@someGroup\/some-two-pack/]
@@ -982,7 +983,7 @@ function t(key: string, choice?: number, values: Array | Object): TranslateResul
982983 }
983984 }
984985 }
985-
986+
986987 createComponent({
987988 setup(){
988989 const { t } = useI18n({
0 commit comments