@tarojs/taro 3.6.0-beta.0 → 3.6.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/taro",
|
|
3
|
-
"version": "3.6.0-beta.
|
|
3
|
+
"version": "3.6.0-beta.2",
|
|
4
4
|
"description": "Taro framework",
|
|
5
5
|
"homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
|
|
6
6
|
"main": "index.js",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"author": "O2Team",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@tarojs/api": "3.6.0-beta.
|
|
25
|
-
"@tarojs/runtime": "3.6.0-beta.
|
|
24
|
+
"@tarojs/api": "3.6.0-beta.2",
|
|
25
|
+
"@tarojs/runtime": "3.6.0-beta.2"
|
|
26
26
|
},
|
|
27
27
|
"peerDependenciesMeta": {
|
|
28
28
|
"@types/react": {
|
|
@@ -355,6 +355,8 @@ declare module '../../index' {
|
|
|
355
355
|
interface Result {
|
|
356
356
|
/** 应用二进制接口类型(仅 Android 支持) */
|
|
357
357
|
abi?: string
|
|
358
|
+
/** 设备二进制接口类型(仅 Android 支持) */
|
|
359
|
+
deviceAbi: string
|
|
358
360
|
/** 设备性能等级(仅Android小游戏)。取值为:-2 或 0(该设备无法运行小游戏),-1(性能未知),>=1(设备性能值,该值越高,设备性能越好,目前最高不到50) */
|
|
359
361
|
benchmarkLevel: number
|
|
360
362
|
/** 设备品牌 */
|
|
@@ -365,6 +367,8 @@ declare module '../../index' {
|
|
|
365
367
|
system: string
|
|
366
368
|
/** 客户端平台 */
|
|
367
369
|
platform: string
|
|
370
|
+
/** 设备 CPU 型号(仅 Android 支持) */
|
|
371
|
+
CPUType: string
|
|
368
372
|
}
|
|
369
373
|
}
|
|
370
374
|
|
|
@@ -18,12 +18,12 @@ declare module '../../index' {
|
|
|
18
18
|
*/
|
|
19
19
|
interface IntersectionObserver {
|
|
20
20
|
/** 停止监听。回调函数将不再触发
|
|
21
|
-
* @supported weapp, tt
|
|
21
|
+
* @supported weapp, tt, h5
|
|
22
22
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.disconnect.html
|
|
23
23
|
*/
|
|
24
24
|
disconnect(): void
|
|
25
25
|
/** 指定目标节点并开始监听相交状态变化情况
|
|
26
|
-
* @supported weapp, tt
|
|
26
|
+
* @supported weapp, tt, h5
|
|
27
27
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.observe.html
|
|
28
28
|
*/
|
|
29
29
|
observe(
|
|
@@ -33,7 +33,7 @@ declare module '../../index' {
|
|
|
33
33
|
callback: IntersectionObserver.ObserveCallback,
|
|
34
34
|
): void
|
|
35
35
|
/** 使用选择器指定一个节点,作为参照区域之一。
|
|
36
|
-
* @supported weapp, tt
|
|
36
|
+
* @supported weapp, tt, h5
|
|
37
37
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/wxml/IntersectionObserver.relativeTo.html
|
|
38
38
|
*/
|
|
39
39
|
relativeTo(
|
|
@@ -43,7 +43,7 @@ declare module '../../index' {
|
|
|
43
43
|
margins?: IntersectionObserver.RelativeToMargins,
|
|
44
44
|
): IntersectionObserver
|
|
45
45
|
/** 指定页面显示区域作为参照区域之一
|
|
46
|
-
* @supported weapp, tt
|
|
46
|
+
* @supported weapp, tt, h5
|
|
47
47
|
* @example
|
|
48
48
|
* 下面的示例代码中,如果目标节点(用选择器 .target-class 指定)进入显示区域以下 100px 时,就会触发回调函数。
|
|
49
49
|
*
|
|
@@ -500,7 +500,7 @@ declare module '../../index' {
|
|
|
500
500
|
createSelectorQuery(): SelectorQuery
|
|
501
501
|
|
|
502
502
|
/** 创建并返回一个 IntersectionObserver 对象实例。在自定义组件或包含自定义组件的页面中,应使用 `this.createIntersectionObserver([options])` 来代替。
|
|
503
|
-
* @supported weapp, tt
|
|
503
|
+
* @supported weapp, h5, tt
|
|
504
504
|
* @example
|
|
505
505
|
* ```tsx
|
|
506
506
|
* const observer = Taro.createIntersectionObserver(this, { thresholds: [0], observeAll: true })
|
|
@@ -513,5 +513,22 @@ declare module '../../index' {
|
|
|
513
513
|
/** 选项 */
|
|
514
514
|
options?: createIntersectionObserver.Option,
|
|
515
515
|
): IntersectionObserver
|
|
516
|
+
|
|
517
|
+
/** 创建并返回一个 MediaQueryObserver 对象实例。在自定义组件或包含自定义组件的页面中,应使用 `this.createMediaQueryObserver()` 来代替。
|
|
518
|
+
* @supported h5
|
|
519
|
+
* @example
|
|
520
|
+
* ```tsx
|
|
521
|
+
* let createMediaQueryObserver
|
|
522
|
+
* if (process.env.TARO_ENV === 'weapp') {
|
|
523
|
+
* // 小程序没有组件实例,只能获取Page级组件实例
|
|
524
|
+
* createMediaQueryObserver = Taro.getCurrentInstance().page.createMediaQueryObserver
|
|
525
|
+
* } else if (process.env.TARO_ENV === 'h5') {
|
|
526
|
+
* createMediaQueryObserver= Taro.createMediaQueryObserver
|
|
527
|
+
* }
|
|
528
|
+
* const mediaQueryObserver = createMediaQueryObserver()
|
|
529
|
+
* ```
|
|
530
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/framework/view/resizable.html#Media%20Query
|
|
531
|
+
*/
|
|
532
|
+
createMediaQueryObserver(): MediaQueryObserver
|
|
516
533
|
}
|
|
517
534
|
}
|