@dcloudio/uni-app-x 0.7.10 → 0.7.12
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/.prettierrc +5 -0
- package/package.json +2 -2
- package/types/native/IUniElement.d.ts +30 -47
- package/types/native/UniApp.d.ts +17 -4
- package/types/native/UniDocument.d.ts +52 -4
- package/types/native/UniNativePage.d.ts +59 -32
- package/types/native/UniNestedPreScrollEvent.d.ts +45 -46
- package/types/native/UniTabsElement.d.ts +51 -21
- package/types/native/UniTextElement.d.ts +18 -1
- package/types/uni/global.d.ts +0 -1
- package/types/uni/index.d.ts +0 -1
- package/types/uni/uts-plugin-api/global.d.ts +12 -0
- package/types/uni/uts-plugin-api/index.d.ts +12 -0
- package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +412 -0
- package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +36 -6
- package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +277 -0
- package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +41 -14
- package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +17 -17
- package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +15 -15
- package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +73 -0
- package/types/uni/{core/lib/lifecycle → uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk}/global.d.ts +2 -0
- package/types/uni/{core/lib/lifecycle → uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk}/index.d.ts +1 -0
- package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +39 -0
- package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +157 -0
- package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +9 -9
- package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +2 -2
- package/types/uni/{core/lib/base/interceptor → uts-plugin-api/lib/uni-interceptor/utssdk}/global.d.ts +0 -2
- package/types/uni/{core/lib/base/interceptor → uts-plugin-api/lib/uni-interceptor/utssdk}/index.d.ts +0 -1
- package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/interface.d.ts +152 -0
- package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +557 -0
- package/types/uni/{core/lib/ui/set-navigation-bar-color → uts-plugin-api/lib/uni-navigationBar/utssdk}/global.d.ts +20 -4
- package/types/uni/{core/lib/ui/set-navigation-bar-title → uts-plugin-api/lib/uni-navigationBar/utssdk}/index.d.ts +10 -2
- package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +794 -0
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/global.d.ts +10 -0
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/index.d.ts +5 -0
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/interface.d.ts +107 -39
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +20 -20
- package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +2 -2
- package/types/uni/{core/lib/ui/page-scroll-to → uts-plugin-api/lib/uni-pageScrollTo/utssdk}/global.d.ts +2 -4
- package/types/uni/{core/lib/ui/page-scroll-to → uts-plugin-api/lib/uni-pageScrollTo/utssdk}/index.d.ts +1 -2
- package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/interface.d.ts +143 -0
- package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +45 -45
- package/types/uni/{core/lib/ui/pull-down-refresh → uts-plugin-api/lib/uni-pullDownRefresh/utssdk}/global.d.ts +2 -4
- package/types/uni/{core/lib/ui/pull-down-refresh → uts-plugin-api/lib/uni-pullDownRefresh/utssdk}/index.d.ts +1 -2
- package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/interface.d.ts +174 -0
- package/types/uni/{core/lib/route → uts-plugin-api/lib/uni-route/utssdk}/global.d.ts +0 -10
- package/types/uni/{core/lib/route → uts-plugin-api/lib/uni-route/utssdk}/index.d.ts +0 -5
- package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +2020 -0
- package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +21 -21
- package/types/uni/{core/lib/ui/tab-bar → uts-plugin-api/lib/uni-tabBar/utssdk}/global.d.ts +4 -2
- package/types/uni/{core/lib/ui/tab-bar → uts-plugin-api/lib/uni-tabBar/utssdk}/index.d.ts +2 -1
- package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +926 -0
- package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +26 -26
- package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +59 -9
- package/types/uni/core/global.d.ts +0 -13
- package/types/uni/core/index.d.ts +0 -13
- package/types/uni/core/lib/base/event/interface.d.ts +0 -277
- package/types/uni/core/lib/base/interceptor/interface.d.ts +0 -150
- package/types/uni/core/lib/interface.d.ts +0 -28
- package/types/uni/core/lib/lifecycle/interface.d.ts +0 -37
- package/types/uni/core/lib/performance/interface.d.ts +0 -157
- package/types/uni/core/lib/route/interface.d.ts +0 -2031
- package/types/uni/core/lib/ui/create-selector-query/interface.d.ts +0 -412
- package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +0 -73
- package/types/uni/core/lib/ui/load-font-face/interface.d.ts +0 -560
- package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +0 -145
- package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +0 -176
- package/types/uni/core/lib/ui/set-navigation-bar-color/index.d.ts +0 -13
- package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +0 -431
- package/types/uni/core/lib/ui/set-navigation-bar-title/global.d.ts +0 -28
- package/types/uni/core/lib/ui/set-navigation-bar-title/interface.d.ts +0 -368
- package/types/uni/core/lib/ui/tab-bar/interface.d.ts +0 -928
- package/types/uni/{core/lib/ui/create-selector-query → uts-plugin-api/lib/uni-createSelectorQuery/utssdk}/global.d.ts +0 -0
- package/types/uni/{core/lib/ui/create-selector-query → uts-plugin-api/lib/uni-createSelectorQuery/utssdk}/index.d.ts +0 -0
- package/types/uni/{core/lib/base/event → uts-plugin-api/lib/uni-event/utssdk}/global.d.ts +0 -0
- package/types/uni/{core/lib/base/event → uts-plugin-api/lib/uni-event/utssdk}/index.d.ts +0 -0
- package/types/uni/{core/lib/ui/get-element-by-id → uts-plugin-api/lib/uni-getElementById/utssdk}/global.d.ts +0 -0
- package/types/uni/{core/lib/ui/get-element-by-id → uts-plugin-api/lib/uni-getElementById/utssdk}/index.d.ts +0 -0
- package/types/uni/{core/lib/performance → uts-plugin-api/lib/uni-getPerformance/utssdk}/global.d.ts +0 -0
- package/types/uni/{core/lib/performance → uts-plugin-api/lib/uni-getPerformance/utssdk}/index.d.ts +0 -0
- package/types/uni/{core/lib/ui/load-font-face → uts-plugin-api/lib/uni-loadFontFace/utssdk}/global.d.ts +2 -2
- package/types/uni/{core/lib/ui/load-font-face → uts-plugin-api/lib/uni-loadFontFace/utssdk}/index.d.ts +1 -1
|
@@ -1,29 +1,59 @@
|
|
|
1
|
-
import { UniElement, UniTabsElement } from "./IUniElement"
|
|
2
|
-
import { UniElementImpl } from "./UniElement"
|
|
1
|
+
import { UniElement, UniTabsElement } from "./IUniElement"
|
|
2
|
+
import { UniElementImpl } from "./UniElement"
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* tabs元素对象
|
|
6
6
|
* @package io.dcloud.uniapp.runtime
|
|
7
7
|
* @autodoc false
|
|
8
8
|
*/
|
|
9
|
-
export class UniTabsElementImpl extends UniElementImpl implements UniTabsElement{
|
|
10
|
-
getTabBarHeight(): number
|
|
11
|
-
appendCustomTabBar(tabBar: UniElement, direction: string): void;
|
|
12
|
-
hideTabBar(op: Map<string, any>): void;
|
|
13
|
-
switchSelect(pageId: string, index: number): void;
|
|
14
|
-
appendItem(itemElement: UniElement): void;
|
|
15
|
-
initTabBar(style: Map<string, any>): void;
|
|
16
|
-
appendItem(pageId: string): void;
|
|
17
|
-
currentItemId: string;
|
|
18
|
-
setTabBarBadge(op: Map<string, any>): void;
|
|
19
|
-
setTabBarStyle(op: Map<string, any>): void;
|
|
20
|
-
isTabBarVisible: boolean;
|
|
21
|
-
setTabBarItem(op: Map<string, any>): void;
|
|
22
|
-
hideTabBarRedDot(op: Map<string, any>): void;
|
|
23
|
-
showTabBar(op: Map<string, any>): void;
|
|
24
|
-
showTabBarRedDot(op: Map<string, any>): void;
|
|
25
|
-
removeTabBarBadge(op: Map<string, any>): void;
|
|
9
|
+
export class UniTabsElementImpl extends UniElementImpl implements UniTabsElement {
|
|
10
|
+
getTabBarHeight(): number
|
|
26
11
|
|
|
12
|
+
/**
|
|
13
|
+
* @uniPlatform {
|
|
14
|
+
* "app": {
|
|
15
|
+
* "android": {
|
|
16
|
+
* "osVer": "5.0",
|
|
17
|
+
* "uniVer": "x",
|
|
18
|
+
* "unixVer": "4.0"
|
|
19
|
+
* },
|
|
20
|
+
* "ios": {
|
|
21
|
+
* "osVer": "x",
|
|
22
|
+
* "uniVer": "x",
|
|
23
|
+
* "unixVer": "x"
|
|
24
|
+
* }
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
*/
|
|
28
|
+
appendCustomTabBar(tabBar: UniElement, direction: string): void
|
|
29
|
+
hideTabBar(op: Map<string, any>): void
|
|
30
|
+
switchSelect(pageId: string, index: number): void
|
|
31
|
+
/**
|
|
32
|
+
* @uniPlatform {
|
|
33
|
+
* "app": {
|
|
34
|
+
* "android": {
|
|
35
|
+
* "osVer": "5.0",
|
|
36
|
+
* "uniVer": "x",
|
|
37
|
+
* "unixVer": "4.0"
|
|
38
|
+
* },
|
|
39
|
+
* "ios": {
|
|
40
|
+
* "osVer": "x",
|
|
41
|
+
* "uniVer": "x",
|
|
42
|
+
* "unixVer": "x"
|
|
43
|
+
* }
|
|
44
|
+
* }
|
|
45
|
+
* }
|
|
46
|
+
*/
|
|
47
|
+
appendItem(itemElement: UniElement): void
|
|
48
|
+
initTabBar(style: Map<string, any>): void
|
|
49
|
+
appendItem(pageId: string): void
|
|
50
|
+
currentItemId: string
|
|
51
|
+
setTabBarBadge(op: Map<string, any>): void
|
|
52
|
+
setTabBarStyle(op: Map<string, any>): void
|
|
53
|
+
isTabBarVisible: boolean
|
|
54
|
+
setTabBarItem(op: Map<string, any>): void
|
|
55
|
+
hideTabBarRedDot(op: Map<string, any>): void
|
|
56
|
+
showTabBar(op: Map<string, any>): void
|
|
57
|
+
showTabBarRedDot(op: Map<string, any>): void
|
|
58
|
+
removeTabBarBadge(op: Map<string, any>): void
|
|
27
59
|
}
|
|
28
|
-
|
|
29
|
-
|
|
@@ -12,6 +12,23 @@ export class UniTextElementImpl extends UniElementImpl implements UniTextElement
|
|
|
12
12
|
* 只读属性 text元素的文案内容
|
|
13
13
|
*/
|
|
14
14
|
value: string
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @uniPlatform {
|
|
18
|
+
* "app": {
|
|
19
|
+
* "android": {
|
|
20
|
+
* "osVer": "5.0",
|
|
21
|
+
* "uniVer": "x",
|
|
22
|
+
* "unixVer": "4.0"
|
|
23
|
+
* },
|
|
24
|
+
* "ios": {
|
|
25
|
+
* "osVer": "x",
|
|
26
|
+
* "uniVer": "x",
|
|
27
|
+
* "unixVer": "x"
|
|
28
|
+
* }
|
|
29
|
+
* }
|
|
30
|
+
* }
|
|
31
|
+
*/
|
|
15
32
|
getTextExtra(): any | null
|
|
16
|
-
constructor
|
|
33
|
+
constructor(data: INodeData, pageNode?: PageNode)
|
|
17
34
|
}
|
package/types/uni/global.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference path='./base/index.d.ts' />
|
|
2
2
|
/// <reference path='./env/index.d.ts' />
|
|
3
|
-
/// <reference path='./core/global.d.ts' />
|
|
4
3
|
/// <reference path='./uts-plugin-api/global.d.ts' />
|
|
5
4
|
/// <reference path='./uts-plugin-biz/global.d.ts' />
|
|
6
5
|
/// <reference path='./uts-plugin-component/global.d.ts' />
|
package/types/uni/index.d.ts
CHANGED
|
@@ -1,23 +1,35 @@
|
|
|
1
1
|
/// <reference path='./lib/uni-websocket/utssdk/global.d.ts' />
|
|
2
|
+
/// <reference path='./lib/uni-tabBar/utssdk/global.d.ts' />
|
|
2
3
|
/// <reference path='./lib/uni-storage/utssdk/global.d.ts' />
|
|
3
4
|
/// <reference path='./lib/uni-rpx2px/utssdk/global.d.ts' />
|
|
5
|
+
/// <reference path='./lib/uni-route/utssdk/global.d.ts' />
|
|
6
|
+
/// <reference path='./lib/uni-pullDownRefresh/utssdk/global.d.ts' />
|
|
4
7
|
/// <reference path='./lib/uni-prompt/utssdk/global.d.ts' />
|
|
5
8
|
/// <reference path='./lib/uni-payment/utssdk/global.d.ts' />
|
|
9
|
+
/// <reference path='./lib/uni-pageScrollTo/utssdk/global.d.ts' />
|
|
6
10
|
/// <reference path='./lib/uni-openAppAuthorizeSetting/utssdk/global.d.ts' />
|
|
7
11
|
/// <reference path='./lib/uni-network/utssdk/global.d.ts' />
|
|
12
|
+
/// <reference path='./lib/uni-navigationBar/utssdk/global.d.ts' />
|
|
8
13
|
/// <reference path='./lib/uni-media/utssdk/global.d.ts' />
|
|
14
|
+
/// <reference path='./lib/uni-loadFontFace/utssdk/global.d.ts' />
|
|
15
|
+
/// <reference path='./lib/uni-interceptor/utssdk/global.d.ts' />
|
|
9
16
|
/// <reference path='./lib/uni-installApk/utssdk/global.d.ts' />
|
|
10
17
|
/// <reference path='./lib/uni-getSystemSetting/utssdk/global.d.ts' />
|
|
11
18
|
/// <reference path='./lib/uni-getSystemInfo/utssdk/global.d.ts' />
|
|
12
19
|
/// <reference path='./lib/uni-getProvider/utssdk/global.d.ts' />
|
|
20
|
+
/// <reference path='./lib/uni-getPerformance/utssdk/global.d.ts' />
|
|
13
21
|
/// <reference path='./lib/uni-getNetworkType/utssdk/global.d.ts' />
|
|
14
22
|
/// <reference path='./lib/uni-getLocation-system/utssdk/global.d.ts' />
|
|
23
|
+
/// <reference path='./lib/uni-getLaunchOptionsSync/utssdk/global.d.ts' />
|
|
24
|
+
/// <reference path='./lib/uni-getElementById/utssdk/global.d.ts' />
|
|
15
25
|
/// <reference path='./lib/uni-getDeviceInfo/utssdk/global.d.ts' />
|
|
16
26
|
/// <reference path='./lib/uni-getAppBaseInfo/utssdk/global.d.ts' />
|
|
17
27
|
/// <reference path='./lib/uni-getAppAuthorizeSetting/utssdk/global.d.ts' />
|
|
18
28
|
/// <reference path='./lib/uni-getAccessibilityInfo/utssdk/global.d.ts' />
|
|
19
29
|
/// <reference path='./lib/uni-fileSystemManager/utssdk/global.d.ts' />
|
|
20
30
|
/// <reference path='./lib/uni-exit/utssdk/global.d.ts' />
|
|
31
|
+
/// <reference path='./lib/uni-event/utssdk/global.d.ts' />
|
|
21
32
|
/// <reference path='./lib/uni-createWebviewContext/utssdk/global.d.ts' />
|
|
33
|
+
/// <reference path='./lib/uni-createSelectorQuery/utssdk/global.d.ts' />
|
|
22
34
|
/// <reference path='./lib/uni-createRequestPermissionListener/utssdk/global.d.ts' />
|
|
23
35
|
/// <reference path='./lib/uni-network/utssdk/app-ios/global.d.ts' />
|
|
@@ -1,23 +1,35 @@
|
|
|
1
1
|
export * from './lib/uni-websocket/utssdk'
|
|
2
|
+
export * from './lib/uni-tabBar/utssdk'
|
|
2
3
|
export * from './lib/uni-storage/utssdk'
|
|
3
4
|
export * from './lib/uni-rpx2px/utssdk'
|
|
5
|
+
export * from './lib/uni-route/utssdk'
|
|
6
|
+
export * from './lib/uni-pullDownRefresh/utssdk'
|
|
4
7
|
export * from './lib/uni-prompt/utssdk'
|
|
5
8
|
export * from './lib/uni-payment/utssdk'
|
|
9
|
+
export * from './lib/uni-pageScrollTo/utssdk'
|
|
6
10
|
export * from './lib/uni-openAppAuthorizeSetting/utssdk'
|
|
7
11
|
export * from './lib/uni-network/utssdk'
|
|
12
|
+
export * from './lib/uni-navigationBar/utssdk'
|
|
8
13
|
export * from './lib/uni-media/utssdk'
|
|
14
|
+
export * from './lib/uni-loadFontFace/utssdk'
|
|
15
|
+
export * from './lib/uni-interceptor/utssdk'
|
|
9
16
|
export * from './lib/uni-installApk/utssdk'
|
|
10
17
|
export * from './lib/uni-getSystemSetting/utssdk'
|
|
11
18
|
export * from './lib/uni-getSystemInfo/utssdk'
|
|
12
19
|
export * from './lib/uni-getProvider/utssdk'
|
|
20
|
+
export * from './lib/uni-getPerformance/utssdk'
|
|
13
21
|
export * from './lib/uni-getNetworkType/utssdk'
|
|
14
22
|
export * from './lib/uni-getLocation-system/utssdk'
|
|
23
|
+
export * from './lib/uni-getLaunchOptionsSync/utssdk'
|
|
24
|
+
export * from './lib/uni-getElementById/utssdk'
|
|
15
25
|
export * from './lib/uni-getDeviceInfo/utssdk'
|
|
16
26
|
export * from './lib/uni-getAppBaseInfo/utssdk'
|
|
17
27
|
export * from './lib/uni-getAppAuthorizeSetting/utssdk'
|
|
18
28
|
export * from './lib/uni-getAccessibilityInfo/utssdk'
|
|
19
29
|
export * from './lib/uni-fileSystemManager/utssdk'
|
|
20
30
|
export * from './lib/uni-exit/utssdk'
|
|
31
|
+
export * from './lib/uni-event/utssdk'
|
|
21
32
|
export * from './lib/uni-createWebviewContext/utssdk'
|
|
33
|
+
export * from './lib/uni-createSelectorQuery/utssdk'
|
|
22
34
|
export * from './lib/uni-createRequestPermissionListener/utssdk'
|
|
23
35
|
export * from './lib/uni-network/utssdk/app-ios'
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
export type CreateSelectorQuery = () => SelectorQuery
|
|
2
|
+
|
|
3
|
+
export type SelectorQueryNodeInfoCallback = (result: any) => void
|
|
4
|
+
|
|
5
|
+
export type NodeInfo = {
|
|
6
|
+
/**
|
|
7
|
+
* 节点的ID
|
|
8
|
+
*/
|
|
9
|
+
id: string | null
|
|
10
|
+
/**
|
|
11
|
+
* 节点的dataset
|
|
12
|
+
*/
|
|
13
|
+
dataset: any | null
|
|
14
|
+
/**
|
|
15
|
+
* 节点的左边界坐标
|
|
16
|
+
*/
|
|
17
|
+
left: number | null
|
|
18
|
+
/**
|
|
19
|
+
* 节点的右边界坐标
|
|
20
|
+
*/
|
|
21
|
+
right: number | null
|
|
22
|
+
/**
|
|
23
|
+
* 节点的上边界坐标
|
|
24
|
+
*/
|
|
25
|
+
top: number | null
|
|
26
|
+
/**
|
|
27
|
+
* 节点的下边界坐标
|
|
28
|
+
*/
|
|
29
|
+
bottom: number | null
|
|
30
|
+
/**
|
|
31
|
+
* 节点的宽度
|
|
32
|
+
*/
|
|
33
|
+
width: number | null
|
|
34
|
+
/**
|
|
35
|
+
* 节点的高度
|
|
36
|
+
*/
|
|
37
|
+
height: number | null
|
|
38
|
+
/**
|
|
39
|
+
* 节点的水平滚动位置
|
|
40
|
+
*/
|
|
41
|
+
scrollLeft: number | null
|
|
42
|
+
/**
|
|
43
|
+
* 节点的垂直滚动位置
|
|
44
|
+
*/
|
|
45
|
+
scrollTop: number | null
|
|
46
|
+
/**
|
|
47
|
+
* 节点的内容高度
|
|
48
|
+
*/
|
|
49
|
+
scrollHeight: number | null
|
|
50
|
+
/**
|
|
51
|
+
* 节点的内容宽度
|
|
52
|
+
*/
|
|
53
|
+
scrollWidth: number | null
|
|
54
|
+
/**
|
|
55
|
+
* 节点对应的 Context 对象
|
|
56
|
+
* @type MapContext | CanvasContext | VideoContext | EditorContext
|
|
57
|
+
* @uniPlatform {
|
|
58
|
+
* "app": {
|
|
59
|
+
* "android": {
|
|
60
|
+
* "osVer": "5.0",
|
|
61
|
+
* "uniVer": "√",
|
|
62
|
+
* "unixVer": "x"
|
|
63
|
+
* },
|
|
64
|
+
* "ios": {
|
|
65
|
+
* "osVer": "10.0",
|
|
66
|
+
* "uniVer": "√",
|
|
67
|
+
* "unixVer": "x"
|
|
68
|
+
* }
|
|
69
|
+
* },
|
|
70
|
+
* "mp": {
|
|
71
|
+
* "weixin": {
|
|
72
|
+
* "hostVer": "√",
|
|
73
|
+
* "uniVer": "√",
|
|
74
|
+
* "unixVer": "√"
|
|
75
|
+
* },
|
|
76
|
+
* "alipay": {
|
|
77
|
+
* "hostVer": "√",
|
|
78
|
+
* "uniVer": "√",
|
|
79
|
+
* "unixVer": "√"
|
|
80
|
+
* },
|
|
81
|
+
* "baidu": {
|
|
82
|
+
* "hostVer": "√",
|
|
83
|
+
* "uniVer": "√",
|
|
84
|
+
* "unixVer": "√"
|
|
85
|
+
* },
|
|
86
|
+
* "toutiao": {
|
|
87
|
+
* "hostVer": "√",
|
|
88
|
+
* "uniVer": "√",
|
|
89
|
+
* "unixVer": "√"
|
|
90
|
+
* },
|
|
91
|
+
* "lark": {
|
|
92
|
+
* "hostVer": "√",
|
|
93
|
+
* "uniVer": "√",
|
|
94
|
+
* "unixVer": "√"
|
|
95
|
+
* },
|
|
96
|
+
* "qq": {
|
|
97
|
+
* "hostVer": "√",
|
|
98
|
+
* "uniVer": "√",
|
|
99
|
+
* "unixVer": "√"
|
|
100
|
+
* },
|
|
101
|
+
* "kuaishou": {
|
|
102
|
+
* "hostVer": "√",
|
|
103
|
+
* "uniVer": "√",
|
|
104
|
+
* "unixVer": "√"
|
|
105
|
+
* },
|
|
106
|
+
* "jd": {
|
|
107
|
+
* "hostVer": "√",
|
|
108
|
+
* "uniVer": "√",
|
|
109
|
+
* "unixVer": "√"
|
|
110
|
+
* }
|
|
111
|
+
* },
|
|
112
|
+
* "web": {
|
|
113
|
+
* "uniVer": "√",
|
|
114
|
+
* "unixVer": "4.0"
|
|
115
|
+
* }
|
|
116
|
+
* }
|
|
117
|
+
*/
|
|
118
|
+
context: any | null
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export type NodeField = {
|
|
122
|
+
/**
|
|
123
|
+
* 是否返回节点 id
|
|
124
|
+
* @type boolean
|
|
125
|
+
*/
|
|
126
|
+
id: boolean | null
|
|
127
|
+
/**
|
|
128
|
+
* 是否返回节点 dataset
|
|
129
|
+
* @type boolean
|
|
130
|
+
*/
|
|
131
|
+
dataset: boolean | null
|
|
132
|
+
/**
|
|
133
|
+
* 是否返回节点布局位置(left right top bottom)
|
|
134
|
+
* @type boolean
|
|
135
|
+
*/
|
|
136
|
+
rect: boolean | null
|
|
137
|
+
/**
|
|
138
|
+
* 是否返回节点尺寸(width height)
|
|
139
|
+
* @type boolean
|
|
140
|
+
*/
|
|
141
|
+
size: boolean | null
|
|
142
|
+
/**
|
|
143
|
+
* 是否返回节点的 scrollLeft scrollTop,节点必须是 scroll-view 或者 viewport
|
|
144
|
+
* @type boolean
|
|
145
|
+
*/
|
|
146
|
+
scrollOffset: boolean | null
|
|
147
|
+
/**
|
|
148
|
+
* 指定属性名列表,返回节点对应属性名的当前属性值(只能获得组件文档中标注的常规属性值,id class style 和事件绑定的属性值不可获取)
|
|
149
|
+
*/
|
|
150
|
+
properties: string[] | null
|
|
151
|
+
/**
|
|
152
|
+
* 指定样式名列表,返回节点对应样式名的当前值
|
|
153
|
+
*/
|
|
154
|
+
computedStyle: string[] | null
|
|
155
|
+
/**
|
|
156
|
+
* 是否返回节点对应的 Context 对象
|
|
157
|
+
* @type boolean
|
|
158
|
+
* @uniPlatform {
|
|
159
|
+
* "app": {
|
|
160
|
+
* "android": {
|
|
161
|
+
* "osVer": "5.0",
|
|
162
|
+
* "uniVer": "√",
|
|
163
|
+
* "unixVer": "x"
|
|
164
|
+
* },
|
|
165
|
+
* "ios": {
|
|
166
|
+
* "osVer": "10.0",
|
|
167
|
+
* "uniVer": "√",
|
|
168
|
+
* "unixVer": "x"
|
|
169
|
+
* }
|
|
170
|
+
* },
|
|
171
|
+
* "mp": {
|
|
172
|
+
* "weixin": {
|
|
173
|
+
* "hostVer": "√",
|
|
174
|
+
* "uniVer": "√",
|
|
175
|
+
* "unixVer": "√"
|
|
176
|
+
* },
|
|
177
|
+
* "alipay": {
|
|
178
|
+
* "hostVer": "√",
|
|
179
|
+
* "uniVer": "√",
|
|
180
|
+
* "unixVer": "√"
|
|
181
|
+
* },
|
|
182
|
+
* "baidu": {
|
|
183
|
+
* "hostVer": "√",
|
|
184
|
+
* "uniVer": "√",
|
|
185
|
+
* "unixVer": "√"
|
|
186
|
+
* },
|
|
187
|
+
* "toutiao": {
|
|
188
|
+
* "hostVer": "√",
|
|
189
|
+
* "uniVer": "√",
|
|
190
|
+
* "unixVer": "√"
|
|
191
|
+
* },
|
|
192
|
+
* "lark": {
|
|
193
|
+
* "hostVer": "√",
|
|
194
|
+
* "uniVer": "√",
|
|
195
|
+
* "unixVer": "√"
|
|
196
|
+
* },
|
|
197
|
+
* "qq": {
|
|
198
|
+
* "hostVer": "√",
|
|
199
|
+
* "uniVer": "√",
|
|
200
|
+
* "unixVer": "√"
|
|
201
|
+
* },
|
|
202
|
+
* "kuaishou": {
|
|
203
|
+
* "hostVer": "√",
|
|
204
|
+
* "uniVer": "√",
|
|
205
|
+
* "unixVer": "√"
|
|
206
|
+
* },
|
|
207
|
+
* "jd": {
|
|
208
|
+
* "hostVer": "√",
|
|
209
|
+
* "uniVer": "√",
|
|
210
|
+
* "unixVer": "√"
|
|
211
|
+
* }
|
|
212
|
+
* },
|
|
213
|
+
* "web": {
|
|
214
|
+
* "uniVer": "√",
|
|
215
|
+
* "unixVer": "4.0"
|
|
216
|
+
* }
|
|
217
|
+
* }
|
|
218
|
+
*/
|
|
219
|
+
context: boolean | null
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export interface NodesRef {
|
|
223
|
+
/**
|
|
224
|
+
* 添加节点的布局位置的查询请求,相对于显示区域,以像素为单位
|
|
225
|
+
*/
|
|
226
|
+
boundingClientRect(
|
|
227
|
+
callback: SelectorQueryNodeInfoCallback | null,
|
|
228
|
+
): SelectorQuery
|
|
229
|
+
|
|
230
|
+
boundingClientRect(): SelectorQuery
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* 添加节点的滚动位置查询请求,以像素为单位
|
|
234
|
+
*/
|
|
235
|
+
scrollOffset(callback: SelectorQueryNodeInfoCallback): SelectorQuery
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* 获取节点的相关信息,需要获取的字段在fields中指定
|
|
239
|
+
*/
|
|
240
|
+
fields(
|
|
241
|
+
fields: NodeField,
|
|
242
|
+
callback: SelectorQueryNodeInfoCallback,
|
|
243
|
+
): SelectorQuery
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* 添加节点的 Context 对象查询请求
|
|
247
|
+
* @uniPlatform {
|
|
248
|
+
* "app": {
|
|
249
|
+
* "android": {
|
|
250
|
+
* "osVer": "5.0",
|
|
251
|
+
* "uniVer": "√",
|
|
252
|
+
* "unixVer": "x"
|
|
253
|
+
* },
|
|
254
|
+
* "ios": {
|
|
255
|
+
* "osVer": "10.0",
|
|
256
|
+
* "uniVer": "√",
|
|
257
|
+
* "unixVer": "x"
|
|
258
|
+
* }
|
|
259
|
+
* },
|
|
260
|
+
* "mp": {
|
|
261
|
+
* "weixin": {
|
|
262
|
+
* "hostVer": "√",
|
|
263
|
+
* "uniVer": "√",
|
|
264
|
+
* "unixVer": "x"
|
|
265
|
+
* },
|
|
266
|
+
* "alipay": {
|
|
267
|
+
* "hostVer": "√",
|
|
268
|
+
* "uniVer": "√",
|
|
269
|
+
* "unixVer": "x"
|
|
270
|
+
* },
|
|
271
|
+
* "baidu": {
|
|
272
|
+
* "hostVer": "√",
|
|
273
|
+
* "uniVer": "√",
|
|
274
|
+
* "unixVer": "x"
|
|
275
|
+
* },
|
|
276
|
+
* "toutiao": {
|
|
277
|
+
* "hostVer": "√",
|
|
278
|
+
* "uniVer": "√",
|
|
279
|
+
* "unixVer": "x"
|
|
280
|
+
* },
|
|
281
|
+
* "lark": {
|
|
282
|
+
* "hostVer": "√",
|
|
283
|
+
* "uniVer": "√",
|
|
284
|
+
* "unixVer": "x"
|
|
285
|
+
* },
|
|
286
|
+
* "qq": {
|
|
287
|
+
* "hostVer": "√",
|
|
288
|
+
* "uniVer": "√",
|
|
289
|
+
* "unixVer": "x"
|
|
290
|
+
* },
|
|
291
|
+
* "kuaishou": {
|
|
292
|
+
* "hostVer": "√",
|
|
293
|
+
* "uniVer": "√",
|
|
294
|
+
* "unixVer": "x"
|
|
295
|
+
* },
|
|
296
|
+
* "jd": {
|
|
297
|
+
* "hostVer": "√",
|
|
298
|
+
* "uniVer": "√",
|
|
299
|
+
* "unixVer": "x"
|
|
300
|
+
* }
|
|
301
|
+
* },
|
|
302
|
+
* "web": {
|
|
303
|
+
* "uniVer": "√",
|
|
304
|
+
* "unixVer": "4.0"
|
|
305
|
+
* }
|
|
306
|
+
* }
|
|
307
|
+
*/
|
|
308
|
+
context(callback: SelectorQueryNodeInfoCallback): SelectorQuery
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* 获取 Node 节点实例。目前支持 Canvas 的获取。
|
|
312
|
+
*/
|
|
313
|
+
node(callback: (result: any) => void): SelectorQuery
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export interface SelectorQuery {
|
|
317
|
+
/**
|
|
318
|
+
* 将选择器的选取范围更改为自定义组件component内
|
|
319
|
+
*/
|
|
320
|
+
in(component: any | null): SelectorQuery
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* 在当前页面下选择第一个匹配选择器selector的节点
|
|
324
|
+
*/
|
|
325
|
+
select(selector: string): NodesRef
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* 在当前页面下选择匹配选择器selector的所有节点
|
|
329
|
+
*/
|
|
330
|
+
selectAll(selector: string): NodesRef
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* 选择显示区域
|
|
334
|
+
*/
|
|
335
|
+
selectViewport(): NodesRef
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* 执行所有的请求
|
|
339
|
+
*/
|
|
340
|
+
exec(callback: (result: Array<any>) => void | null): NodesRef | null
|
|
341
|
+
|
|
342
|
+
exec(): NodesRef | null
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export interface Uni {
|
|
346
|
+
/**
|
|
347
|
+
* 返回一个SelectorQuery对象实例
|
|
348
|
+
*
|
|
349
|
+
* @tutorial https://doc.dcloud.net.cn/uni-app-x/api/nodes-info.html
|
|
350
|
+
* @uniPlatform {
|
|
351
|
+
* "app": {
|
|
352
|
+
* "android": {
|
|
353
|
+
* "osVer": "5.0",
|
|
354
|
+
* "uniVer": "√",
|
|
355
|
+
* "unixVer": "3.91"
|
|
356
|
+
* },
|
|
357
|
+
* "ios": {
|
|
358
|
+
* "osVer": "12.0",
|
|
359
|
+
* "uniVer": "√",
|
|
360
|
+
* "unixVer": "4.11"
|
|
361
|
+
* }
|
|
362
|
+
* },
|
|
363
|
+
* "mp": {
|
|
364
|
+
* "weixin": {
|
|
365
|
+
* "hostVer": "√",
|
|
366
|
+
* "uniVer": "√",
|
|
367
|
+
* "unixVer": "√"
|
|
368
|
+
* },
|
|
369
|
+
* "alipay": {
|
|
370
|
+
* "hostVer": "√",
|
|
371
|
+
* "uniVer": "√",
|
|
372
|
+
* "unixVer": "√"
|
|
373
|
+
* },
|
|
374
|
+
* "baidu": {
|
|
375
|
+
* "hostVer": "√",
|
|
376
|
+
* "uniVer": "√",
|
|
377
|
+
* "unixVer": "√"
|
|
378
|
+
* },
|
|
379
|
+
* "toutiao": {
|
|
380
|
+
* "hostVer": "√",
|
|
381
|
+
* "uniVer": "√",
|
|
382
|
+
* "unixVer": "√"
|
|
383
|
+
* },
|
|
384
|
+
* "lark": {
|
|
385
|
+
* "hostVer": "√",
|
|
386
|
+
* "uniVer": "√",
|
|
387
|
+
* "unixVer": "√"
|
|
388
|
+
* },
|
|
389
|
+
* "qq": {
|
|
390
|
+
* "hostVer": "√",
|
|
391
|
+
* "uniVer": "√",
|
|
392
|
+
* "unixVer": "√"
|
|
393
|
+
* },
|
|
394
|
+
* "kuaishou": {
|
|
395
|
+
* "hostVer": "√",
|
|
396
|
+
* "uniVer": "√",
|
|
397
|
+
* "unixVer": "√"
|
|
398
|
+
* },
|
|
399
|
+
* "jd": {
|
|
400
|
+
* "hostVer": "√",
|
|
401
|
+
* "uniVer": "√",
|
|
402
|
+
* "unixVer": "√"
|
|
403
|
+
* }
|
|
404
|
+
* },
|
|
405
|
+
* "web": {
|
|
406
|
+
* "uniVer": "√",
|
|
407
|
+
* "unixVer": "4.0"
|
|
408
|
+
* }
|
|
409
|
+
* }
|
|
410
|
+
*/
|
|
411
|
+
createSelectorQuery(): SelectorQuery
|
|
412
|
+
}
|
|
@@ -9,7 +9,12 @@ export interface WebviewContext {
|
|
|
9
9
|
* "osVer": "5.0",
|
|
10
10
|
* "uniVer": "x",
|
|
11
11
|
* "unixVer": "3.9.0"
|
|
12
|
-
* }
|
|
12
|
+
* },
|
|
13
|
+
* "ios": {
|
|
14
|
+
* "osVer": "12.0",
|
|
15
|
+
* "uniVer": "√",
|
|
16
|
+
* "unixVer": "4.11"
|
|
17
|
+
* }
|
|
13
18
|
* }
|
|
14
19
|
* }
|
|
15
20
|
* @uniVueVersion 2,3
|
|
@@ -24,7 +29,12 @@ export interface WebviewContext {
|
|
|
24
29
|
* "osVer": "5.0",
|
|
25
30
|
* "uniVer": "x",
|
|
26
31
|
* "unixVer": "3.9.0"
|
|
27
|
-
* }
|
|
32
|
+
* },
|
|
33
|
+
* "ios": {
|
|
34
|
+
* "osVer": "12.0",
|
|
35
|
+
* "uniVer": "√",
|
|
36
|
+
* "unixVer": "4.11"
|
|
37
|
+
* }
|
|
28
38
|
* }
|
|
29
39
|
* }
|
|
30
40
|
* @uniVueVersion 2,3
|
|
@@ -39,7 +49,12 @@ export interface WebviewContext {
|
|
|
39
49
|
* "osVer": "5.0",
|
|
40
50
|
* "uniVer": "x",
|
|
41
51
|
* "unixVer": "3.9.0"
|
|
42
|
-
* }
|
|
52
|
+
* },
|
|
53
|
+
* "ios": {
|
|
54
|
+
* "osVer": "12.0",
|
|
55
|
+
* "uniVer": "√",
|
|
56
|
+
* "unixVer": "4.11"
|
|
57
|
+
* }
|
|
43
58
|
* }
|
|
44
59
|
* }
|
|
45
60
|
* @uniVueVersion 2,3
|
|
@@ -54,7 +69,12 @@ export interface WebviewContext {
|
|
|
54
69
|
* "osVer": "5.0",
|
|
55
70
|
* "uniVer": "x",
|
|
56
71
|
* "unixVer": "3.9.0"
|
|
57
|
-
* }
|
|
72
|
+
* },
|
|
73
|
+
* "ios": {
|
|
74
|
+
* "osVer": "12.0",
|
|
75
|
+
* "uniVer": "√",
|
|
76
|
+
* "unixVer": "4.11"
|
|
77
|
+
* }
|
|
58
78
|
* }
|
|
59
79
|
* }
|
|
60
80
|
* @uniVueVersion 2,3
|
|
@@ -69,7 +89,12 @@ export interface WebviewContext {
|
|
|
69
89
|
* "osVer": "5.0",
|
|
70
90
|
* "uniVer": "x",
|
|
71
91
|
* "unixVer": "3.9.0"
|
|
72
|
-
* }
|
|
92
|
+
* },
|
|
93
|
+
* "ios": {
|
|
94
|
+
* "osVer": "12.0",
|
|
95
|
+
* "uniVer": "√",
|
|
96
|
+
* "unixVer": "4.11"
|
|
97
|
+
* }
|
|
73
98
|
* }
|
|
74
99
|
* }
|
|
75
100
|
* @uniVueVersion 2,3
|
|
@@ -86,7 +111,12 @@ export interface Uni {
|
|
|
86
111
|
* "osVer": "5.0",
|
|
87
112
|
* "uniVer": "x",
|
|
88
113
|
* "unixVer": "3.9.0"
|
|
89
|
-
* }
|
|
114
|
+
* },
|
|
115
|
+
* "ios": {
|
|
116
|
+
* "osVer": "12.0",
|
|
117
|
+
* "uniVer": "√",
|
|
118
|
+
* "unixVer": "4.11"
|
|
119
|
+
* }
|
|
90
120
|
* },
|
|
91
121
|
* "web": {
|
|
92
122
|
* "uniVer": "x",
|